单臂路由详细配置(是在Packet Tracer 5.0模拟器上完成):
一.
1.实验器材:
2811路由器一台,2690交换器一台,二台pc机
2.先在交换机上配置二个vlan
vlan 2:
网关:192.168.1.33 255.255.255.224
网络id:192.168.1.32
pc0:192.168.1.34 255.255.255.224
vlan 3:
网关:192.168.1.65 255.255.255.224
网络id:192.168.1.64
pc1:192.168.1.66 255.255.255.224
二.配置:
1.配置路由器:
Router>enable
Router#configure terminal
Router(config)#interface fastEthernet 0/0
Router(config-if)#no ip address
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface fastEthernet 0/0.1
Router(config-subif)#encapsulation dot1Q 2
Router(config-subif)#ip address 192.168.1.33 255.255.255.224
Router(config-subif)#no shutdown
Router(config-subif)#exit
Router(config)#interface fastEthernet 0/0.2
Router(config-subif)#encapsulation dot1Q 3
Router(config-subif)#ip address 192.168.1.65 255.255.255.224
Router(config-subif)#no shutdown
Router(config-subif)#end
Router#show running-config
2.配置交换机:
Switch>enable
Switch#configure terminal
Switch(config)#interface fastEthernet 0/3
Switch(config-if)#switchport mode trunk
Switch(config-if)#exit
Switch(config)#vlan 2
Switch(config-vlan)#name wangchao2
Switch(config-vlan)#vlan 3
Switch(config-vlan)#name wangchao3
Switch(config-vlan)#exit
Switch(config)#interface fastEthernet 0/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 2
Switch(config-if)#exit
Switch(config)#interface fastEthernet 0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 3
Switch(config-if)#end
Switch#show running-config
1.实验器材:
2811路由器一台,2690交换器一台,二台pc机
2.先在交换机上配置二个vlan
vlan 2:
网关:192.168.1.33 255.255.255.224
网络id:192.168.1.32
pc0:192.168.1.34 255.255.255.224
vlan 3:
网关:192.168.1.65 255.255.255.224
网络id:192.168.1.64
pc1:192.168.1.66 255.255.255.224
二.配置:
1.配置路由器:
Router>enable
Router#configure terminal
Router(config)#interface fastEthernet 0/0
Router(config-if)#no ip address
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface fastEthernet 0/0.1
Router(config-subif)#encapsulation dot1Q 2
Router(config-subif)#ip address 192.168.1.33 255.255.255.224
Router(config-subif)#no shutdown
Router(config-subif)#exit
Router(config)#interface fastEthernet 0/0.2
Router(config-subif)#encapsulation dot1Q 3
Router(config-subif)#ip address 192.168.1.65 255.255.255.224
Router(config-subif)#no shutdown
Router(config-subif)#end
Router#show running-config
2.配置交换机:
Switch>enable
Switch#configure terminal
Switch(config)#interface fastEthernet 0/3
Switch(config-if)#switchport mode trunk
Switch(config-if)#exit
Switch(config)#vlan 2
Switch(config-vlan)#name wangchao2
Switch(config-vlan)#vlan 3
Switch(config-vlan)#name wangchao3
Switch(config-vlan)#exit
Switch(config)#interface fastEthernet 0/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 2
Switch(config-if)#exit
Switch(config)#interface fastEthernet 0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 3
Switch(config-if)#end
Switch#show running-config
3.配置pc机:
pc0:
网关:192.168.1.33
ip:192.168.1.34
子网掩码:255.255.255.224(/27)
pc1:
网关:192.168.1.65
ip:192.168.1.66
子网掩码:255.255.255.224(/27)
按照上面步骤来,就行了。
在pc机上测试就不用我细说了吧.
转载于:https://blog.51cto.com/simeixiaofeng/121402