Router Installation and Configuration Manual/Configuring an ADSL Interface

From ImageStream Router Documentation

(Difference between revisions)
Jump to: navigation, search
(New page: == Advanced Configuration Examples == === Virtual router example emulating four ADSL routers using PPPoA and Ethernet VLANs === * Four ADSL interfaces * Four Ethernet VLANs * Each VLAN ma...)
(Virtual router example emulating four ADSL routers using PPPoA and Ethernet VLANs)
Line 2: Line 2:
=== Virtual router example emulating four ADSL routers using PPPoA and Ethernet VLANs ===
=== Virtual router example emulating four ADSL routers using PPPoA and Ethernet VLANs ===
-
* Four ADSL interfaces
 
* Four Ethernet VLANs
* Four Ethernet VLANs
* Each VLAN may only transmit on one ADSL interface
* Each VLAN may only transmit on one ADSL interface
* Each VLAN must provide DHCP server services
* Each VLAN must provide DHCP server services
-
* Each ADSL interface must source NAT for its VLAN
+
 
 +
<b>ADSL specifications:</b>
 +
* Four ADSL interfaces:
 +
:{| class="wikitable"
 +
|-
 +
!align="left" width="15%"|ADSL Interface
 +
!align="left" width="15%"|ATM Interface
 +
!align="left" width="8%"|VPI/VCI
 +
!align="left" width="15%"|ATM Encapsulation
 +
!align="left" width="15%"|PPP Username
 +
!align="left" width="15%"|VLAN Interface
 +
|-
 +
| ADSL0
 +
| Serial0.1
 +
| 8/35
 +
| VC-Mux
 +
| test1@imagestream.com
 +
| Ethernet1.10
 +
|-
 +
| ADSL1
 +
| Serial1.1
 +
| 8/35
 +
| VC-Mux
 +
| test1@imagestream.com
 +
| Ethernet1.11
 +
|-
 +
| ADSL2
 +
| Serial2.1
 +
| 8/35
 +
| VC-Mux
 +
| test1@imagestream.com
 +
| Ethernet1.12
 +
|-
 +
| ADSL3
 +
| Serial3.1
 +
| 8/35
 +
| VC-Mux
 +
| test1@imagestream.com
 +
| Ethernet1.13
 +
|}
* PPPoA using VC-Mux encapsulation (no LLC/SNAP headers)
* PPPoA using VC-Mux encapsulation (no LLC/SNAP headers)
-
* If PPPoA  with LLC/SNAP headers is required change the ''encapsulation aal5mux ppp'' to ''encapsulation aal5snap''
+
: If PPPoA  with LLC/SNAP headers is required change the ''encapsulation aal5mux ppp'' to ''encapsulation aal5snap''
 +
* Usernames: test1@imagestream.com, test2@imagestream.com, test3@imagestream.com, test4@imagestream.com
 +
* ADSL0 links to Ethernet1.10
 +
* ADSL1 links to Ethernet1.11
 +
* ADSL2 links to Ethernet1.12
 +
* ADSL3 links to Ethernet1.13
 +
 
 +
* Each ADSL interface must source NAT for its VLAN
 +
* VLANS will be configured on Ethernet1
<b>wan.conf:</b>
<b>wan.conf:</b>

Revision as of 00:55, 6 June 2009

Advanced Configuration Examples

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

  • Four Ethernet VLANs
  • 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@imagestream.com Ethernet1.10
ADSL1 Serial1.1 8/35 VC-Mux test1@imagestream.com Ethernet1.11
ADSL2 Serial2.1 8/35 VC-Mux test1@imagestream.com Ethernet1.12
ADSL3 Serial3.1 8/35 VC-Mux test1@imagestream.com Ethernet1.13
  • PPPoA using VC-Mux encapsulation (no LLC/SNAP headers)
If PPPoA with LLC/SNAP headers is required change the encapsulation aal5mux ppp to encapsulation aal5snap
  • Usernames: test1@imagestream.com, test2@imagestream.com, test3@imagestream.com, test4@imagestream.com
  • ADSL0 links to Ethernet1.10
  • ADSL1 links to Ethernet1.11
  • ADSL2 links to Ethernet1.12
  • ADSL3 links to Ethernet1.13
  • Each ADSL interface must source NAT for its VLAN
  • VLANS will be configured on Ethernet1

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 aal5mux ppp
  pvc 8/35
 !
 interface ADSL0
  adsl device Serial0.1
  protocol pppoa
  ip address negotiated
  ppp pap sent-username test1@imagestream.com password mypass
 !
 interface ADSL1
  adsl device Serial1.1
  protocol pppoa
  ip address negotiated
  ppp pap sent-username test2@imagestream.com password mypass
 !
 interface ADSL2
  adsl device Serial2.1
  protocol pppoa
  ip address negotiated
  ppp pap sent-username test3@imagestream.com password mypass
 !
 interface ADSL3
  adsl device Serial3.1
  protocol pppoa
  ip address negotiated
  ppp pap sent-username test4@imagestream.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 imagestream.com
  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 imagestream.com
  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 imagestream.com
  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 imagestream.com
  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
Personal tools
Router software releases