思科三层网络拓扑
配置端口,创建vlan,划分端口vlan,划分端口类型
sw1
vlan 10
e
vlan 20
e
vlan 50
int f0/1
sw mode access
sw access vlan 50 (配置端口)
int f0/2
sw mode access
sw access vlan 10
int f0/3
sw mode access
sw access vlan 20
int f0/4
sw mode trunk
ip routing
vlan 10
e
vlan 20
e
vlan 30
e
vlan 40
e
vlan 50
e
int f0/1
sw trunk en dot1q (给端口打标签,划分端口类型)
sw mode trunk
int f0/2
sw trunk en dot1q
sw mode trunk
int f0/3
sw trunk en dot1q
sw mode trunk
int f0/4
sw trunk en dot1q
sw mode trunk
int f0/5
no sw
ip add 60.1.1.1 255.255.255.0
int vlan 10
ip add 10.1.1.254 255.255.255.0 (配置vlan ip)
int vlan 20
ip add 20.1.1.254 255.255.255.0
int vlan 30
ip add 30.1.1.254 255.255.255.0
int vlan 40
ip add 40.1.1.254 255.255.255.0
int vlan 50
ip add 50.1.1.254 255.255.255.0
e
ip dhcp pool 10 (创建DHCP地址池)
network 10.1.1.0 mask 24 (划分地址池的IP段)
gateway-list 10.1.1.254 (该网段的网关)
ip dhcp pool 20
network 20.1.1.0 mask 24
gateway-list 20.1.1.254
ip dhcp pool 10
network 30.1.1.0 mask 24
gateway-list 30.1.1.254
ip dhcp pool 10
network 40.1.1.0 mask 24
gateway-list 40.1.1.254
ip dhcp pool 10
network 50.1.1.0 mask 24
gateway-list 50.1.1.254
router rip
version 2
network 10.0.0.0
network 20.0.0.0 (动态路由)
network 30.0.0.0
network 40.0.0.0
network 50.0.0.0
network 60.0.0.0
R1
int g0/0
ip add 60.1.1.254 255.255.255.0 (配置端口信息)
no sh
int g0/1
ip add 70.1.1.1 255.255.255.0
router rip (动态路由)
version 2
network 60.0.0.0
network 70.0.0.0