思路:
1.1.1.1/32(这个地址不需要在公网,仅内网)1.1.1.1 的 80 流量,执行 http-redirect 302,定向到 http://192.168.1.1/portal192.168.1.1 的流量,防止重定向死循环# 1、建环回口,提供 1.1.1.1
interface LoopBack 0
ip address 1.1.1.1 255.255.255.255
# 2、ACL 匹配目的 1.1.1.1 的 http
acl advanced 3000
rule permit tcp any host 1.1.1.1 eq 80
# 3、traffic behavior:http 302 重定向
traffic behavior b-redirect
http-redirect url http://192.168.1.1/portal
traffic behavior b-permit
permit
# 4、分类、策略
traffic classifier c-redirect
if-match acl 3000
traffic policy p-portal-entry
classifier c-redirect behavior b-redirect
# 在 IPoE 用户的入方向接口/VLANIF 下发
interface Vlan-interface 100
traffic-policy p-portal-entry inbound
如果不想所有用户都命中,可以叠加
if-match user-group,只对 IPoE 用户组生效;同时配置 portal free-rule,放行192.168.1.1,不然跳不过去。
IPoE+Web‑Portal(SR8800‑X/CR16000‑F 这类 BRAS):
ip subscriber,ISP 域配置认证前域(pre‑auth),放行 Portal 服务器免认证,开启 URL 重定向规则ip subscriber if‑matchH3C。注意:不是 “访问 1.1.1.1 这个 IP 强制跳转”,而是用户浏览器发起任意 HTTP 请求(目的 IP 不管是 1.1.1.1 还是其他外网),BRAS 拦截 HTTP 80 报文,302 重定向返回 Portal 服务器地址
http://192.168.1.1。 ❌BRAS 不能实现:用户仅仅在地址栏敲1.1.1.1,不发出 HTTP 访问就直接跳转;必须要有浏览器 HTTP 报文触发重定向。
interface Vlan‑interface 100
ip subscriber enable
ip subscriber access‑mode ipoe
ip subscriber domain pre‑auth‑domain
pre‑auth‑domain是认证前 ISP 域,未认证用户会进入这个域,做重定向 + 免放行 Portal 服务器。
192.168.1.1的 80/443(免认证,否则重定向后页面打不开)system‑view
#配置重定向规则:任意原始url,重定向portal地址
interface Vlan‑interface 100
ip subscriber if‑match original‑url http://* redirect‑url http://192.168.1.1
ip subscriber if‑match这条就是 IPoE 子 scriber 的 URL 重定向命令,对静态手工配置 IP 的 IPoE 用户生效H3C。
未认证用户必须允许访问
192.168.1.1,否则重定向之后页面无法加载。
acl number 3000
rule permit ip destination 192.168.1.1 0
user‑group pre‑group
acl 3000
isp domain pre‑auth‑domain
authorization‑scheme none
authentication‑scheme none
accounting‑scheme none
user‑group pre‑group
ip subscriber if‑match:手工静态 IP 的 IPoE 用户不会触发重定向;DHCP 的 IPoE 可以,静态手工 IP 不行。192.168.1.1报文被拒绝,页面空白。display ip subscriber interface Vlan‑interface 100
display ip subscriber if‑match
display isp‑domain name pre‑auth‑domain
display acl resource
暂无评论
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论