2018-12-09 动态路由

在这里插入图片描述

二层交换机:

Switch>en

Switch#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#vlan 10

Switch(config-vlan)#exit

Switch(config)#vlan 20

Switch(config-vlan)#exit

Switch(config)#int f vlan 10

Switch(config)#int vlan 10

%LINK-5-CHANGED: Interface Vlan10, changed state to up

Switch(config-if)#no shut

Switch(config-if)#exit

Switch(config)#int vlan 20

%LINK-5-CHANGED: Interface Vlan20, changed state to up

Switch(config-if)#no shut

Switch(config-if)#exit

Switch(config)#int f 0/1

Switch(config-if)#sw m a

Switch(config-if)#sw a vlan 10

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up

Switch(config-if)#exit

Switch(config)#int f 0/2

Switch(config-if)#sw m a

Switch(config-if)#sw a vlan 20

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up

Switch(config-if)#exit

Switch(config)#int r f 0/23-24

Switch(config-if-range)#sw m t

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/23, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/23, changed state to up

Switch(config-if-range)#

Switch#

三层交换机:

Switch(config-if-range)#exit

Switch(config)#vlan 10

Switch(config-vlan)#exit

Switch(config)#vlan 20

Switch(config-vlan)#exit

Switch(config)#vlan 30

Switch(config-vlan)#exit

Switch(config)#int vlan 10

%LINK-5-CHANGED: Interface Vlan10, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up

Switch(config-if)#no shut

Switch(config-if)#ip add 192.168.1.1 255.255.255.0

Switch(config-if)#exit

Switch(config)#int vlan 20

Switch(config-if)#

%LINK-5-CHANGED: Interface Vlan20, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up

Switch(config-if)#no shut

Switch(config-if)#ip add 192.168.2.1 255.255.255.0

Switch(config-if)#exit

Switch(config)#int vlan 30

%LINK-5-CHANGED: Interface Vlan30, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan30, changed state to up

Switch(config-if)#no shut

Switch(config-if)#ip add 192.168.3.1 255.255.255.0

Switch(config-if)#exit

Switch(config)#int f 0/24

Switch(config-if)#sw m a

Switch(config-if)#sw a vlan 30

Switch(config-if)#exit

Switch(config)#ip routing

Switch(config)#router rip

Switch(config-router)#v 2

Switch(config-router)#ne 192.168.1.0

Switch(config-router)#ne 192.168.2.0

Switch(config-router)#ne 192.168.3.0

Switch(config-router)#no au

第一个路由:

Router>en

Router#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#int f 0/0

Router(config-if)#no shut

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

Router(config-if)#ip add 192.168.3.2 255.255.255.0

Router(config-if)#exit

Router(config)#int f 0/1

Router(config-if)#no shut

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

Router(config-if)#ip add 192.168.4.1 255.255.255.0

Router(config-if)#exit

Router(config)#router rip

Router(config-router)#v 2

Router(config-router)#ne 192.168.3.0

Router(config-router)#ne 192.168.4.0

Router(config-router)#no au

第二个路由:

Router>en

Router#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#int f 0/0

Router(config-if)#no shut

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

Router(config-if)#ip add 192.168.4.2 255.255.255.0

Router(config-if)#exit

Router(config)#int f 0/1

Router(config-if)#no shut

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

Router(config-if)#ip add 192.168.5.1 255.255.255.0

Router(config-if)#exit

Router(config)#router rip

Router(config-router)#v 2

Router(config-router)#ne 192.168.4.0

Router(config-router)#ne 192.168.5.0

Router(config-router)#no au

第三个路由:

Router>en

Router#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#int f 0/0

Router(config-if)#no shut

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

Router(config-if)#ip add 192.168.5.2 255.255.255.0

Router(config-if)#exit

Router(config)#int f 0/1

Router(config-if)#no shut

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

Router(config-if)#ip add 192.168.6.1 255.255.255.0

Router(config-if)#exit

Router(config)#router rip

Router(config-router)#v 2

Router(config-router)#ne 192.168.5.0

Router(config-router)#ne 192.168.6.0

Router(config-router)#no au

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值