Vlan域间路由
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Vlan域间路由
[SW1]
创建vlan、划分vlan接口和类型
[SW1]vlan batch 10 20
[SW1]int g0/0/2
[SW1-GigabitEthernet0/0/2]port link-type access
[SW1-GigabitEthernet0/0/2]port default vlan 10
[SW1]int g0/0/3
[SW1-GigabitEthernet0/0/3]port link-type access
[SW1-GigabitEthernet0/0/3]port default vlan 20
[SW1]int g0/0/1
[SW1-GigabitEthernet0/0/1]port link-type trunk
[SW1-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 20 [AR1]
接口dot1q
[AR1]int g0/0/0.1
[AR1-GigabitEthernet0/0/0.1]ip address 192.168.10.1 24 [AR1-GigabitEthernet0/0/0.1]dot1q termination vid 10 [AR1-GigabitEthernet0/0/0.1]arp broadcast enable
[AR1]int g0/0/0.2
[AR1-GigabitEthernet0/0/0.2]ip add 192.168.20.1 24
[AR1-GigabitEthernet0/0/0.2]dot1q termination vid 20 [AR1-GigabitEthernet0/0/0.2]arp broadcast enable 接口配置
[AR1]int g0/0/1
[AR1-GigabitEthernet0/0/1]ip add 12.1.1.1 24
dhcp relay
[AR1]dhcp enable
[AR1]int g0/0/0.1
[AR1-GigabitEthernet0/0/0.1]dhcp select relay
[AR1-GigabitEthernet0/0/0.1]dhcp relay server-ip 12.1.1.2 [AR1]int g0/0/0.2
[AR1-GigabitEthernet0/0/0.2]dhcp select relay
[AR1-GigabitEthernet0/0/0.2]dhcp relay server-ip 12.1.1.2
[SW3]
创建vlan、划分vlan接口和类型
[SW3]vlan batch 10 20
[SW3]int g0/0/3
[SW3-GigabitEthernet0/0/3]port link-type access [SW3-GigabitEthernet0/0/3]port default vlan 10 [SW3]port-group group-member g0/0/1 g0/0/2 [SW3-port-group]port link-type trunk
[SW3-port-group]port trunk allow-pass vlan 10 20 [SW4]
创建vlan、划分vlan接口和类型
[SW4]vlan batch 10 20
[SW4]int g0/0/3
[SW4-GigabitEthernet0/0/3]port link-type access [SW4-GigabitEthernet0/0/3]port default vlan 20 [SW4]port-group group-member g0/0/1 g0/0/2 [SW4-port-group]port link-type trunk
[SW4-port-group]port trunk allow-pass vlan 10 20 [SW2]
创建vlan、配置vlanif
[SW2]vlan batch 10 20 100
[SW2]int Vlanif 10
[SW2-Vlanif10]ip add 192.168.30.1 24
[SW2]int Vlanif 20
[SW2-Vlanif20]ip add 192.168.40.1 24
[SW2]int Vlanif 100
[SW2-Vlanif100]ip add 22.1.1.2 2
划分vlan接口和类型
[SW2]int g0/0/3
[SW2-GigabitEthernet0/0/3]port link-type access [SW2-GigabitEthernet0/0/3]port default vlan 100 [SW2]port-group group-member g0/0/1 g0/0/2 [SW2-port-group]port link-type trunk
[SW2-port-group]port trunk allow-pass vlan 10 20生成树
[SW2]stp root primary
dhcp relay
[SW2]dhcp enable
[SW2]int Vlanif 10
[SW2-Vlanif10]dhcp select relay
[SW2-Vlanif10]dhcp relay server-ip 22.1.1.1
[SW2]int Vlanif 20
[SW2-Vlanif20]dhcp select relay
[SW2-Vlanif20]dhcp relay server-ip 22.1.1.1
[AR2]
接口配置
[AR2]int g0/0/0
[AR2-GigabitEthernet0/0/0]ip add 12.1.1.2 24 [AR2]int g0/0/1
[AR2-GigabitEthernet0/0/1]ip add 22.1.1.1 24开启dhcp服务,创建地址池
[AR2]dhcp enable
[AR2]ip pool vlan10
[AR2-ip-pool-vlan10]network 192.168.10.0 mask 24 [AR2-ip-pool-vlan10]gateway-list 192.168.10.1 [AR2-ip-pool-vlan10]dns-list 8.8.8.8
[AR2]ip pool vlan20
[AR2-ip-pool-vlan20]network 192.168.20.0 mask 24 [AR2-ip-pool-vlan20]gateway-list 192.168.20.1 [AR2-ip-pool-vlan20]dns-list 8.8.8.8
[AR2]ip pool vlan30
[AR2-ip-pool-vlan30]network 192.168.30.0 mask 24 [AR2-ip-pool-vlan30]gateway-list 192.168.30.1 [AR2-ip-pool-vlan30]dns-list 8.8.8.8
[AR2]ip pool vlan40