设置PCA ip:10.65.1.1 gateway:10.65.1.2
设置PCB ip:10.66.1.1 gateway:10.66.1.2
1.一个接口两个IP的情况
system
password:
[Quidway]interface ethernet0
[Quidway-Ethernet0]ip addr 10.65.1.2 255.255.255.0
[Quidway-Ethernet1]ip addr 10.66.1.2 255.255.255.0 secondary
[Quidway-Ethernet1]undo shutdown
[root@PCA root]#ping 10.66.1.1 通
2.划分两个子接口,对两个vlan的路由
[SwitchA]vlan 2
[SwitchA-vlan2]port e0/3
[SwitchA]vlan 3
[SwitchA-vlan3]port e0/6
[SwitchA]ine e0/1
[SwitchA-Ethernet0/1]port link-type trunk
[SwitchA-Ethernet0/1]port trunk permit vlan all
[SwitchA-Ethernet0/1]port trunk encap dot1q
[SwitchA]dis curr
[Quidway]int e0
[SwitchA-Ethernet0]int e0.1
[SwitchA-Ethernet0.1]encapsulation dot1q 2
[SwitchA-Ethernet0.1]ip addr 10.65.1.2 255.255.255.0
[SwitchA-Ethernet0.1]nudo shut
[SwitchA-Ethernet0.1]int e0.2
[SwitchA-Ethernet0.2]encapsulation dot1q 2
[SwitchA-Ethernet0.2]ip addr 10.66.1.2 255.255.255.0
[SwitchA-Ethernet0.2]nudo shut
[SwitchA]dis curr
[root@PCA root]#ping 10.66.1.1 通
阅读(2012) | 评论(2) | 转发(0) |