Below is how you can replace the router with a Linux based router for internet access, which is tagged to VLAN 500.
1. Create the VLAN interface
Run the following command to create a VLAN interface. Replace the x with your actual interface eg eth0, which will then make the VLAN interface as 'eth0.500'. The '.' is an indication that it is a VLAN interface.
[root@router ~]# vi /etc/sysconfig/network-scripts/ifcfg-x.500
Enter the following details
DEVICE=eth0.500
TYPE="VLAN"
ONBOOT="yes"
BOOTPROTO="none"
VLAN="yes"
TYPE="VLAN"
ONBOOT="yes"
BOOTPROTO="none"
VLAN="yes"
2. Create the PPP interface
Run the following command to create the PPP interface
Enter the following details. Remember to change as needed.
[root@router ~]# vi /etc/sysconfig/network-scripts/ifcfg-ppp0
Enter the following details. Remember to change as needed.
DEVICE=ppp0
TYPE="xDSL"
USERCTL="no"
BOOTPROTO="dialup"
NAME="DSLppp0"
ONBOOT="yes"
PIDFILE="/var/run/pppoe-ppp0.pid"
FIREWALL="NONE"
PING="."
PPPOE_TIMEOUT="80"
LCP_FAILURE="5"
LCP_INTERVAL="20"
CLAMPMSS="1412"
CONNECT_POLL="6"
CONNECT_TIMEOUT="80"
DEFROUTE="yes"
SYNCHRONOUS="no"
ETH="eth0.500"
PROVIDER="DSLppp0"
PEERDNS="yes"
USER="yourusername@unifibiz"
3. Create the PPP password files
Create the password files with the following command, one for CHAP and and one for PAP
[root@router ~]# vi /etc/ppp/chap-secrets
[root@router ~]# vi /etc/ppp/pap-secrets
Enter your username and password as provided by TM for both files.
"yourusername@unifibiz" * "password" *
4. You can now start the PPP interface
[root@router ~]# ifup ppp0
5. Check if the connection is successful
You can check if the connection is successful by running the following command. If the connection is successful, the ppp0 will be up and obtained an IP address
[root@router ~]# ifconfig ppp0ppp0 Link encap:Point-to-Point Protocolinet addr:x.x.x.x P-t-P:x.x.x.x Mask:255.255.255.255UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1RX packets:908071 errors:0 dropped:0 overruns:0 frame:0TX packets:397529 errors:0 dropped:0 overruns:0 carrier:0collisions:0 txqueuelen:3RX bytes:1039747302 (991.5 MiB) TX bytes:91079309 (86.8 MiB)
2 comments:
Hi thanks foor sharing this
Interesting thoughts I really enjoyed your blog.
Post a Comment