HTTP redirect (captive portal)

SR OS routers support redirecting HTTP traffic by using the line card ingress IP and IPv6 filter policy action http-redirect. This capability is mainly used in a subscriber-management context to redirect a subscriber web session to a captive portal landing page. Examples of use-cases include redirecting a subscriber after initial connection to a new network to accept the terms of service, or a subscriber out of quota redirection.

Traffic matching the http-redirect filter entry is sent to the SF/CPM for HTTP redirection:

Additional subscriber information may be required by the captive portal. This information can be appended as variables in the http-redirect URL and automatically substituted with the relevant subscriber session data, as follows:

The recommended filter configuration to redirect HTTP traffic page is described below using ingress ip-filter policy "10":

        ip-filter 10 name "10" create 
            entry 10 create
                description "Allow DNS Traffic to DNS servers"
                match protocol udp
                    dst-ip ip-prefix-list "dns-servers"
                    dst-port eq 53
                exit
                action
                    forward
                exit
            exit
            entry 20 create
                description "Allow HTTP traffic to redirect portal"
                match protocol tcp
                    dst-ip ip-prefix-list "portal-servers"
                    dst-port eq 80
                exit
                action
                    forward
                exit
            exit
            entry 30 create
                description "HTTP Redirect all other TCP 80 flows"
                match protocol tcp
                    dst-port eq 80
                exit
                action
                    http-redirect "http://www.mydomain/com/                redirect.html?subscriber=$SUB&ipaddress=$IP&mac=$MAC&location=$SAP."
                exit 
            exit
            entry 40 create
                description "Drop anything else"
                action
                    drop
                exit
            exit
        exit

Also, the router supports two redirect scale modes that are configurable at the system level. The optimized-mode improves the number of HTTP redirect sessions supported by system as compared to the no optimized-mode, as follows:

A>config>system>cpm-http-redirect#
----------------------------------------------
 optimized-mode
----------------------------------------------