一、组网需求:
网络中有一台SR6602路由器上连两台路由器RTA与RTB,RTA与RTB连接不同的服务器。
用户欲实现以下需求:
1. PC通过pppoe拨号获得IP地址。
2. PC通过SR6602上缺省路由访问RTB连接的服务器。
3. PC通过SR6602上策略路由访问RTA连接的服务器。
设备及版本:SR6602路由器1台(版本为R3303)、MSR路由器2台
二、组网图:
一、配置步骤:
SR6602 配置 |
# domain default enable system # acl number 2000 rule 0 permit source 1.1.1.0 0.0.0.255 # domain system authentication ppp local access-limit disable state active idle-cut disable self-service-url disable ip pool 1 1.1.1.2 1.1.1.10 //定义为PPP用户分配IP地址的地址池 # policy-based-route h3c permit node 10 //创建策略节点 if-match acl 2000 apply ip-address next-hop 10.1.1.2 //配置IPv4路由信息的下一跳地址 # local-user h3c password simple h3c service-type ppp # interface Virtual-Template1 ppp authentication-mode chap domain system //配置本端PPP协议对对端设备的认证方式 ppp chap user h3c //配置采用CHAP认证时的用户名 remote address pool 1 ip address 1.1.1.1 255.255.255.0 # interface GigabitEthernet0/2 ip address 20.1.1.1 255.255.255.0 # interface GigabitEthernet0/1 ip address 10.1.1.1 255.255.255.0 # interface GigabitEthernet0/2 pppoe-server bind Virtual-Template 1 //在以太网接口上启用PPPoE协议,将该以太网接口与指定的虚拟模板接口绑定 # ip route-static 0.0.0.0 0.0.0.0 20.1.1.2 |
RTA配置 |
# interface GigabitEthernet0/0 ip address 10.1.1.2 255.255.255.0 # ip route-static 0.0.0.0 0.0.0.0 10.1.1.1 |
RTB 配置 |
# interface GigabitEthernet0/0 ip address 20.1.1.2 255.255.255.0 # ip route-static 0.0.0.0 0.0.0.0 20.1.1.1 |
二、功能测试:
使用PC进行拨号,获得1.1.1.0/24网段的ip地址
查看SR6602路由表
[6602]dis ip routing-table
Routing Tables: Public
Destinations : 10 Routes : 10
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/0 Static 60 0 20.1.1.2 GE0/1
1.1.1.0/24 Direct 0 0 1.1.1.1 VT1
1.1.1.1/32 Direct 0 0 127.0.0.1 InLoop0
1.1.1.3/32 Direct 0 0 1.1.1.3 VT1
10.1.1.0/24 Direct 0 0 10.1.1.1 GE0/0
10.1.1.1/32 Direct 0 0 127.0.0.1 InLoop0
20.1.1.0/24 Direct 0 0 20.1.1.1 GE0/1
20.1.1.1/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
没有去往2.2.2.2网段的路由条目
interface GigabitEthernet0/2
ip policy-based-route h3c
从PC上ping 3.3.3.3发现可以ping通,ping 2.2.2.2发现ping不通,证明策略路由没有生效。
2. 将策略路由下发在VT1口:
interface Virtual-Template1
ip policy-based-route h3c
从PC上ping 3.3.3.3发现可以ping通,ping 2.2.2.2发现可以ping通,证明策略路由生效。
五、配置关键点:
无
该案例暂时没有网友评论
✖
案例意见反馈
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作