1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| 接口ip interface GigabitEthernet1/0 no switchport ip address 1.1.1.1 255.255.255.0
vlan配置 vlan 10 vlan 20 vlan 30 vlan 40
vlanif配置 interface Vlan10 ip address 10.1.1.1 255.255.255.0 ! interface Vlan20 ip address 20.1.1.1 255.255.255.0 ! interface Vlan30 ip address 30.1.1.1 255.255.255.0 ! interface Vlan40 ip address 40.1.1.1 255.255.255.0
用户接口配置 interface GigabitEthernet0/0 switchport access vlan 10 ! interface GigabitEthernet0/1 switchport access vlan 20 ! interface GigabitEthernet0/2 switchport access vlan 30 ! interface GigabitEthernet0/3 switchport access vlan 40
路由配置 ip route 0.0.0.0 0.0.0.0 1.1.1.2
|