三层交换机配置及命令解释(2)
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
三层交换机配置及命令解释(2)
三层交换机配置及命令解释
no shutdown
三层交换机配置:
standby 3 ip 172.16.3.254
standby 3 priority 110 preempt
ip access-group 101 in
interface vlan 4 //同上
ip address 172.16.4.252 255.255.255.0
no shutdown
standby 4 ip 172.16.4.254
standby 4 priority 110 preempt
ip access-group 101 in
interface vlan 5
ip address 172.16.5.252 255.255.255.0
no shutdown
standby 5 ip 172.16.5.254
standby 5 priority 110 preempt
ip access-group 101 in
interface vlan 6
ip address 172.16.6.252 255.255.255.0
no shutdown
三层交换机配置:
standby 6 ip 172.16.6.254
standby 6 priority 100 preempt
interface vlan 7
ip address 172.16.7.252 255.255.255.0
no shutdown
standby 7 ip 172.16.7.254
standby 7 priority 100 preempt
interface vlan 8
ip address 172.16.8.252 255.255.255.0
no shutdown
standby 8 ip 172.16.8.254
standby 8 priority 100 preempt
interface vlan 9
ip address 172.16.9.252 255.255.255.0
no shutdown
三层交换机配置:
standby 9 ip 172.16.9.254
standby 9 priority 100 preempt
access-list 101 deny ip any 172.16.7.0 0.0.0.255 //扩展的访问控制列表101
access-list 101 permit ip any any
Interface vlan 1 //进入vlan1这个逻辑接口
Ip helper-address 172.16.8.1 //可以转发广播(helper-address 的作用就是把广播转化为单播,然后发向172.16.8.1)
Interface vlan 2
Ip helper-address 172.16.8.1
Interface vlan 3
ip helper-address 172.16.8.1
interface vlan 4
ip helper-address 172.16.8.1
interface vlan 5
ip helper-address 172.16.8.1
interface vlan 6
ip helper-address 172.16.8.1
interface vlan 7
ip helper-address 172.16.8.1
interface vlan 9
ip helper-address 172.16.8.1
router rip //启用路由协议RIP
version 2 //使用的是RIPv2,如果没有这句,则是使用RIPv1
network 172.16.0.0 //宣告直连的网段
exit
三层交换机配置:
ip route 0.0.0.0 0.0.0.0 172.16.9.250 //缺省路由,所有在路由表中没有办法匹配的数据包,都发向下一跳地址为172.16.9.250这个路由器
line con 0
line aux 0
line vty 0 15 //telnet线路(路由器只有5个,是0-4)
password 12345678 //login密码
login
end
copy running-config startup-config 保存配置。