cisco2801和cisco2960交换机实现双adsl接入及划分vlan,vlan通过不同的adsl上网,策略路由实现vlan之间的通信

路由器的配置:

1.双 adsl接入

 interface FastEthernet0/1
 no ip address
 ip virtual-reassembly
 duplex auto
 speed auto
 pppoe enable group global
 pppoe-client dial-pool-number 1
!
interface FastEthernet0/3/0
 no ip address
 ip virtual-reassembly
 rate-limit input access-group rate-limit 108 16000 3000 3000 conform-action transmit exceed-action drop
 duplex auto
 speed auto
 pppoe enable group global
 pppoe-client dial-pool-number 2
!
interface Dialer1
 ip address negotiated
 ip mtu 1492
 ip nat outside
 ip virtual-reassembly
 encapsulation ppp
 dialer pool 1
 dialer idle-timeout 0
 dialer-group 1
 ppp authentication pap callin
 ppp pap sent-username 280000036969 password 7 0302091E510B785F17
!
interface Dialer2
 bandwidth 2048
 ip address negotiated
 ip mtu 1492
 ip nat outside
 ip virtual-reassembly
 encapsulation ppp
 ip route-cache policy
 dialer pool 2
 dialer idle-timeout 0
 dialer-group 2
 ppp authentication pap callin
 ppp pap sent-username 280000047142 password 7 140D4A1A5E1D783C7D
!

2.划分vlan

 a. 路由器上:

 interface FastEthernet0/0
 no ip address
 ip nat inside
 ip virtual-reassembly
 duplex auto
 speed auto
!        
interface FastEthernet0/0.2
 encapsulation dot1Q 2
 ip address 192.168.2.1 255.255.255.0
 ip nat inside
 ip virtual-reassembly
 ip policy route-map 200
!
interface FastEthernet0/0.3
 encapsulation dot1Q 3
 ip address 192.168.3.1 255.255.255.0
 ip nat inside
 ip virtual-reassembly
 ip policy route-map 300
!
b.交换机上

   interface FastEthernet0/1
   switchport mode trunk
!
interface FastEthernet0/5
 switchport access vlan 2
!
interface FastEthernet0/6
 switchport access vlan 3

!

3.用策略路由实现vlan之间的通信和adsl分流

其中的0网段链接在另一台路由器上,通过光纤上网

 

配置访问控制列表:
access-list 2 permit 192.168.2.0 0.0.0.255
access-list 3 permit 192.168.3.0 0.0.0.255
access-list 100 permit ip any 192.168.0.0 0.0.0.255
access-list 101 permit ip any 192.168.2.0 0.0.0.255
access-list 102 permit ip any 192.168.3.0 0.0.0.255
access-list 110 permit ip any 192.168.0.0 0.0.0.255

 

 

做策略路由:

route-map 200 permit 20
 match ip address 102
 set interface FastEthernet0/0.3
!
route-map 200 permit 30
 match ip address 100
 set ip next-hop 192.168.2.253  
!
route-map 200 permit 40
 match ip address 2
 set interface Dialer1
!
route-map 300 permit 20
 match ip address 101
 set interface FastEthernet0/0.2
!
route-map 300 permit 30
 match ip address 110
 set ip next-hop 192.168.2.253
!
route-map 300 permit 40
 match ip address 3
 set interface Dialer2

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值