赞
踩
掌握静态路由基本的配置方法
现在需求如下:
让PC1能够访问Server
[SW2]vlan 999(创建互联vlan)
[SW2][SW2]interface Vlanif 1
[SW2-Vlanif1]ip address 192.168.1.1 24(设置网关地址)
[SW2]interface Vlanif 999
[SW2-Vlanif999]ip address 192.168.100.2 24(设置互联vlan的IP地址)
[SW2]ip route-static 100.100.100.0 24 192.168.100.1(设置静态路由访问100.100.100.0/24这个网段)
[R1]interface GigabitEthernet0/0/0
[R1-GigabitEthernet0/0/0]ip address 192.168.100.1 24
[R1]interface GigabitEthernet0/0/1
[R1-GigabitEthernet0/0/0]ip address 12.1.1.1 24
[R1]ip route-static 100.100.100.0 24 12.1.1.2(设置静态路由访问100.100.100.0/24这个网段)
[R1]ip route-static 192.168.1.0 24 192.168.100.2(回程路由)
[R2]interface GigabitEthernet0/0/0
[R2-GigabitEthernet0/0/0]ip address 12.1.1.2 24
[R2]interface GigabitEthernet0/0/1
[R2-GigabitEthernet0/0/1]ip address 100.100.100.1(服务器的网关)
[R2]ip route-static 192.168.1.0 24 12.1.1.1(设置回程路由)
可见各设备都已经有了到达目标网段的路由和回程路由
可见PC1已经可以访问server
实验完成!!!
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。