地址池命令 思科理由_Cisco net动态地址池转换

对路由器进行配置

Router>en

Router#conf

Configuring from terminal, memory, or network [terminal]?

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

Router(config)#int f0/1

Router(config-if)#no ip address

Router(config-if)#no shut

Router(config-if)#

%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)#exit

Router(config)#int f0/1.10

Router(config-subif)#

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

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

Router(config-subif)#enc

Router(config-subif)#encapsulation dot1q 40

Router(config-subif)#ip address 192.168.6.1 255.255.255.0

% Configuring IP routing on a LAN subinterface is only allowed if that

subinterface is already configured as part of an IEEE 802.10, IEEE 802.1Q,

or ISL vLAN.

Router(config-subif)#exit

Router(config)#int f0/1.20

Router(config-subif)#

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

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

Router(config-subif)#encapsulation dot1q 50

Router(config-subif)#ip address 192.168.7.1 255.255.255.0

% Configuring IP routing on a LAN subinterface is only allowed if that

subinterface is already configured as part of an IEEE 802.10, IEEE 802.1Q,

or ISL vLAN.

Router(config-subif)#exit

Router(config-subif)#end

Router#

%SYS-5-CONFIG_I: Configured from console by console

Router#

Router>en

Router#conf

Configuring from terminal, memory, or network [terminal]?

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

Router(config)#int f0/1

Router(config-if)#no ip address

Router(config-if)#no shut

Router(config-if)#

%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)#exit

Router(config)#int f0/1.10

Router(config-subif)#

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

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

Router(config-subif)#ip address 192.168.6.1 255.255.255.0

% Configuring IP routing on a LAN subinterface is only allowed if that

subinterface is already configured as part of an IEEE 802.10, IEEE 802.1Q,

or ISL vLAN.

Router(config-subif)#enc

Router(config-subif)#encapsulation dot1q 40

Router(config-subif)#exit

Router(config)#int f0/1.20

Router(config-subif)#

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

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

Router(config-subif)#ip address 192.168.7.1 255.255.255.0

% Configuring IP routing on a LAN subinterface is only allowed if that

subinterface is already configured as part of an IEEE 802.10, IEEE 802.1Q,

or ISL vLAN.

Router(config-subif)#encapsulation dot1q 50

Router(config-subif)#exit

Router#conf

Configuring from terminal, memory, or network [terminal]?

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

Router(config)#int f0/0

Router(config-if)#ip address 192.168.5.2 255.255.255.0

Router(config-if)#no shut

Router(config-if)#

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

Router(config-if)#exit

Router(config)#ip route 192.168.1.0 255.255.255.0 192.168.5.1

Router(config)#ip route 192.168.2.0 255.255.255.0 192.168.5.1

Router(config)#ip route 192.168.3.0 255.255.255.0 192.168.5.1

Router(config)#ip route 192.168.4.0 255.255.255.0 192.168.5.1

Router(config)#ip route 192.168.8.0 255.255.255.0 192.168.5.1

Router(config)#ip route 192.168.9.0 255.255.255.0 192.168.5.1

以上路由表可用默认路由代替

Router(config)#ip route 0.0.0.0  0.0.0.0  f0/0   {192.168.5.1 }

Router(config)#end

Router#

Router>

Router>en

Router#

Router#conf

Configuring from terminal, memory, or network [terminal]?

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

Router(config)#access-list 101 permit tcp 192.168.1.0 0.0.0.255 host 192.168.6.10 eq www

Router(config)#access-list 101 permit tcp 192.168.1.0 0.0.0.255 host 192.168.7.10 eq www

Router(config)#access-list 101 deny ip 192.168.1.0 0.0.0.255 host 192.168.6.10

Router(config)#access-list 101 deny ip 192.168.1.0 0.0.0.255 host 192.168.7.10

Router(config)#access-list 101 permit tcp 192.168.2.0 0.0.0.255 host 192.168.7.10 eq www

Router(config)#access-list 101 deny tcp 192.168.2.0 0.0.0.255 host 192.168.6.10 eq www

Router(config)#access-list 101 deny ip 192.168.2.0 0.0.0.255 host 192.168.7.10

Router(config)#access-list 101 deny ip 192.168.2.0 0.0.0.255 host 192.168.6.10

Router(config)#int f0/0

Router(config-if)#ip access-group 101 in

Router(config-if)#exit

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值