Router Installation and Configuration Manual/Configuring an ADSL Interface

From ImageStream Router Documentation

Jump to: navigation, search

PCI 304-ADSL.JPG

Advanced Configuration Examples

Virtual router example emulating four ADSL routers using PPPoA and Ethernet VLANs

This example is designed to emulate the following multi-router setup on a single ImageStream router with a multi-port ADSL card:

  • Four stand-alone ADSL routers each with one ATM ADSL interface and one Ethernet port.
  • Each ADSL router provides DHCP server services to its Ethernet LAN.
  • Each ADSL router performs source Network Address Translation (SNAT) on the ADSL interface.
  • Ethernet switch with one port connected to each ADSL router.
  • Ethernet switch has one VLAN trunk port with one VLAN mapped to each ADSL router switch port.

Ethernet VLAN specifications:

  • Four Ethernet VLANs
VLAN Interface ADSL Interface VLAN IP Address VLAN DHCP Subnet
Ethernet1.10 ADSL0 192.168.10.1/24 192.168.10.0/24
Ethernet1.11 ADSL1 192.168.11.1/24 192.168.11.0/24
Ethernet1.12 ADSL2 192.168.12.1/24 192.168.12.0/24
Ethernet1.13 ADSL3 192.168.13.1/24 192.168.13.0/24
  • Each VLAN may only transmit on one ADSL interface
  • Each VLAN must provide DHCP server services

ADSL specifications:

  • Four ADSL interfaces:
ADSL Interface ATM Interface VPI/VCI ATM Encapsulation PPP Username VLAN Interface
ADSL0 Serial0.1 8/35 VC-Mux test1@mydomain.com Ethernet1.10
ADSL1 Serial1.1 8/35 VC-Mux test1@mydomain.com Ethernet1.11
ADSL2 Serial2.1 8/35 VC-Mux test1@mydomain.com Ethernet1.12
ADSL3 Serial3.1 8/35 SNAP/LLC test1@mydomain.com Ethernet1.13
  • Each ADSL interface must source NAT for its VLAN

wan.conf:

 interface Ethernet1
 !
 interface Ethernet1.10
  ip address 192.168.10.1 255.255.255.0
 !
 interface Ethernet1.11
  ip address 192.168.11.1 255.255.255.0
 !
 interface Ethernet1.12
  ip address 192.168.12.1 255.255.255.0
 !
 interface Ethernet1.13
  ip address 192.168.13.1 255.255.255.0
 !
 interface Serial0
  encapsulation atm
 !
 interface Serial0.1
  encapsulation aal5mux ppp
  pvc 8/35
 !
 interface Serial1
  encapsulation atm
 !
 interface Serial1.1
  encapsulation aal5mux ppp
  pvc 8/35
 !
 interface Serial2
  encapsulation atm
 !
 interface Serial2.1
  encapsulation aal5mux ppp
  pvc 8/35
 !
 interface Serial3
  encapsulation atm
 !
 interface Serial3.1
  encapsulation aal5snap
  pvc 8/35
 !
 interface ADSL0
  adsl device Serial0.1
  protocol pppoa
  ip address negotiated
  ppp pap sent-username test1@mydomain.com password mypass
 !
 interface ADSL1
  adsl device Serial1.1
  protocol pppoa
  ip address negotiated
  ppp pap sent-username test2@mydomain.com password mypass
 !
 interface ADSL2
  adsl device Serial2.1
  protocol pppoa
  ip address negotiated
  ppp pap sent-username test3@mydomain.com password mypass
 !
 interface ADSL3
  adsl device Serial3.1
  protocol pppoa
  ip address negotiated
  ppp pap sent-username test4@mydomain.com password mypass
 !
 # Link Ethernet0.10 to ADSL0
 ip rule add fwmark 0x10 table 10
 ip route add default dev ADSL0 table 10

 # Link Ethernet0.11 to ADSL1
 ip rule add fwmark 0x11 table 11
 ip route add default dev ADSL1 table 11

 # Link Ethernet0.12 to ADSL2
 ip rule add fwmark 0x12 table 12
 ip route add default dev ADSL2 table 12

 # Link Ethernet0.13 to ADSL3
 ip rule add fwmark 0x13 table 13
 ip route add default dev ADSL3 table 13
 !
 ip dhcp pool 0
  network 192.168.10.0 255.255.255.0
  ip dhcp excluded-address 192.168.10.1
  domain-name <brand info="domain" />
  dns-server 211.52.5.55 205.159.243.2
  default-router 192.168.10.1
  lease 12 hours
 !
 ip dhcp pool 1
  network 192.168.11.0 255.255.255.0
  ip dhcp excluded-address 192.168.11.1
  domain-name <brand info="domain" />
  dns-server 211.52.5.55 205.159.243.2
  default-router 192.168.11.1
  lease 12 hours
 !
 ip dhcp pool 2
  network 192.168.12.0 255.255.255.0
  ip dhcp excluded-address 192.168.12.1
  domain-name <brand info="domain" />
  dns-server 211.52.5.55 205.159.243.2
  default-router 192.168.12.1
  lease 12 hours
 !
 ip dhcp pool 3
  network 192.168.13.0 255.255.255.0
  ip dhcp excluded-address 192.168.13.1
  domain-name <brand info="domain" />
  dns-server 211.52.5.55 205.159.243.2
  default-router 192.168.13.1
  lease 12 hours
 !

rc.firewall:

 iptables -F -t nat

 # Ethernet0.10: Mark all incoming traffic with mark 0x10 and NAT outgoing traffic to the PPP address
 iptables -A PREROUTING -t mangle -i Ethernet0.10 -j MARK --set-mark 0x10
 iptables -t nat -A POSTROUTING -s 192.168.10.0/24 -j MASQUERADE

 # Ethernet0.11: Mark all incoming traffic with mark 0x11 and NAT outgoing traffic to the PPP address
 iptables -A PREROUTING -t mangle -i Ethernet0.11 -j MARK --set-mark 0x11
 iptables -t nat -A POSTROUTING -s 192.168.11.0/24 -j MASQUERADE

 # Ethernet0.12: Mark all incoming traffic with mark 0x12 and NAT outgoing traffic to the PPP address
 iptables -A PREROUTING -t mangle -i Ethernet0.12 -j MARK --set-mark 0x12
 iptables -t nat -A POSTROUTING -s 192.168.12.0/24 -j MASQUERADE

 # Ethernet0.13: Mark all incoming traffic with mark 0x13 and NAT outgoing traffic to the PPP address
 iptables -A PREROUTING -t mangle -i Ethernet0.13 -j MARK --set-mark 0x13
 iptables -t nat -A POSTROUTING -s 192.168.13.0/24 -j MASQUERADE

Troubleshooting

To troubleshoot PPP connection issues add the ppp debug command to the appropriate ADSL interface.

 interface ADSL0
  adsl device Serial0.1
  protocol pppoa
  ip address negotiated
  ppp pap sent-username test1@mydomain.com password mypass
 !

The debugging information will be output to syslog and can be viewed using option 2 (Router event log) from the advanced menu.

Router: lab2, Version 4.2.12-22

Advanced
--------------------------------------------------------------------------------
1. Bash shell
2. Router event log (syslog)     <- ***
3. Router debug log
4. View the Routing table
5. View internal hardware status
6. View process information (top)
7. Router license information
0. ISis-Router main menu

Sample output:

Jun 12 17:01:11 lab1 pppd[14990]: Plugin /usr/lib/pppd/pppoany.so loaded.
Jun 12 17:01:11 lab1 pppd[14990]: PPPoAny plugin version 1.0 compiled against pppd 2.4.4
Jun 12 17:01:11 lab1 pppd[14990]: pppd 2.4.4 started by root, uid 0
Jun 12 17:01:11 lab1 pppd[14990]: using channel 2224
Jun 12 17:01:11 lab1 pppd[14990]: Using interface ppp0
Jun 12 17:01:11 lab1 pppd[14990]: Connect: ppp0 <--> Serial8.30387
Jun 12 17:01:11 lab1 pppd[14990]: sent [LCP ConfReq id=0x1 <mru 1492> <asyncmap 0x0> <magic 0x81f37706>]
Jun 12 17:01:11 lab1 pppd[14990]: rcvd [LCP ConfReq id=0x1 <auth pap> <magic 0xb14fa57d> <mrru 1500> <endpoint [MAC:00:1b:21:03:8e:f1]>]
Jun 12 17:01:11 lab1 pppd[14990]: sent [LCP ConfRej id=0x1 <mrru 1500>]
Jun 12 17:01:11 lab1 pppd[14990]: rcvd [LCP ConfReq id=0x2 <auth pap> <magic 0xb14fa57d> <endpoint [MAC:00:1b:21:03:8e:f1]>]
Jun 12 17:01:11 lab1 pppd[14990]: sent [LCP ConfAck id=0x2 <auth pap> <magic 0xb14fa57d> <endpoint [MAC:00:1b:21:03:8e:f1]>]
Jun 12 17:01:14 lab1 pppd[14990]: rcvd [LCP ConfReq id=0x2 <auth pap> <magic 0xb14fa57d> <endpoint [MAC:00:1b:21:03:8e:f1]>]
Jun 12 17:01:14 lab1 pppd[14990]: sent [LCP ConfAck id=0x2 <auth pap> <magic 0xb14fa57d> <endpoint [MAC:00:1b:21:03:8e:f1]>]
Jun 12 17:01:14 lab1 pppd[14990]: sent [LCP ConfReq id=0x1 <mru 1492> <asyncmap 0x0> <magic 0x81f37706>]
Jun 12 17:01:14 lab1 pppd[14990]: rcvd [LCP ConfRej id=0x1 <asyncmap 0x0>]
Jun 12 17:01:14 lab1 pppd[14990]: sent [LCP ConfReq id=0x2 <mru 1492> <magic 0x81f37706>]
Jun 12 17:01:14 lab1 pppd[14990]: rcvd [LCP ConfAck id=0x2 <mru 1492> <magic 0x81f37706>]
Jun 12 17:01:14 lab1 pppd[14990]: sent [LCP EchoReq id=0x0 magic=0x81f37706]
Jun 12 17:01:14 lab1 pppd[14990]: sent [PAP AuthReq id=0x1 user="test@mydomain.com" password=<hidden>]
Jun 12 17:01:14 lab1 pppd[14990]: rcvd [LCP EchoRep id=0x0 magic=0xb14fa57d]
Jun 12 17:01:14 lab1 pppd[14990]: rcvd [PAP AuthAck id=0x1 ""]
Jun 12 17:01:14 lab1 pppd[14990]: PAP authentication succeeded
Jun 12 17:01:14 lab1 pppd[14990]: sent [IPCP ConfReq id=0x1 <addr 0.0.0.0>]
Jun 12 17:01:14 lab1 pppd[14990]: rcvd [IPCP ConfReq id=0x1 <addr 1.2.3.4>]
Jun 12 17:01:14 lab1 pppd[14990]: sent [IPCP ConfAck id=0x1 <addr 1.2.3.4>]
Jun 12 17:01:14 lab1 pppd[14990]: rcvd [IPCP ConfNak id=0x1 <addr 8.0.0.1>]
Jun 12 17:01:14 lab1 pppd[14990]: sent [IPCP ConfReq id=0x2 <addr 8.0.0.1>]
Jun 12 17:01:14 lab1 pppd[14990]: rcvd [IPCP ConfAck id=0x2 <addr 8.0.0.1>]
Jun 12 17:01:14 lab1 pppd[14990]: local  IP address 8.0.0.1
Jun 12 17:01:14 lab1 pppd[14990]: remote IP address 1.2.3.4
Jun 12 17:01:14 lab1 pppd[14990]: Script /etc/ppp/ip-up started (pid 14992)
Jun 12 17:01:14 lab1 pppd[14990]: Script /etc/ppp/ip-up finished (pid 14992), status = 0x0

To view traffic on either the PPP interface or Serial interface see the section on Viewing Traffic using the Interface Statistics Program

Personal tools
Router software releases