11
Jump to first page Setup Ethernet & PPP client on Laptop computer Presented by: Xuewu Cai Jianfang Wang

Jump to first page Setup Ethernet & PPP client on Laptop computer Presented by: Xuewu Cai Jianfang Wang

Embed Size (px)

Citation preview

Page 1: Jump to first page Setup Ethernet & PPP client on Laptop computer Presented by: Xuewu Cai Jianfang Wang

Jump to first page

Setup Ethernet & PPP client on Laptop computer

Presented by: Xuewu Cai

Jianfang Wang

Page 2: Jump to first page Setup Ethernet & PPP client on Laptop computer Presented by: Xuewu Cai Jianfang Wang

Jump to first page

Project Purpose

1. Setup PCMCIA controller , let it probe correctly PCMCIA card attached on it.

2. Set up Ethernet interface, including assign IP address, subnet mask to it.

3. Setup PPP dialup client , write a script program using AT command set to dialup. Configure pppd to setup PPP interface.

Page 3: Jump to first page Setup Ethernet & PPP client on Laptop computer Presented by: Xuewu Cai Jianfang Wang

Jump to first page

Cont’d (purpose)

4. Choose proper route for 2 interfaces above including default router, local subnet route,etc .loopback interface route.

Page 4: Jump to first page Setup Ethernet & PPP client on Laptop computer Presented by: Xuewu Cai Jianfang Wang

Jump to first page

Configureation Steps Ethernet card, Modem,etc are installed

onto laptop computer by PCMCIA controller as PCMCIA card.

PCMCIA card can include ethernet card, modem, memory card, serial card,SCSI&IDE card,etc.

PCMCIA support should be compiled into Linux kernel

Page 5: Jump to first page Setup Ethernet & PPP client on Laptop computer Presented by: Xuewu Cai Jianfang Wang

Jump to first page

Cont’d (Steps) Put system reserved I/O port, memory into

/etc/pcmcia/config.opts, in out project,parameter is :

I/O Range: 3E0-3E1 Memory Range: D8000-DBFFF

Current release contain drivers for all the devices. All these drives are loaded as modules on linux.

When system(socket driver) detect the availability of pcmcia card in socket slots, it will run corresponding shell program under /etc/pcmcia to bring up interfaces.

Ethernet card will run “network”, modem will run “serial”,etc

Page 6: Jump to first page Setup Ethernet & PPP client on Laptop computer Presented by: Xuewu Cai Jianfang Wang

Jump to first page

Configure Ethernet card

Set network configuration parameter into /etc/pcmcia/network.opts

The details of setting:

IP address : 130.85.100.254

Subnet mask: 255.255.255.0

Page 7: Jump to first page Setup Ethernet & PPP client on Laptop computer Presented by: Xuewu Cai Jianfang Wang

Jump to first page

Cont’d (Ethernet Card)

DNS1: 130.85.1.5 DNS2: 130.85.1.3 default router: 130.85.100.1

local subnet route: 130.85.100.0 0.0.0.0

Page 8: Jump to first page Setup Ethernet & PPP client on Laptop computer Presented by: Xuewu Cai Jianfang Wang

Jump to first page

Ifconfig output

lo        Link encap:Local Loopback           inet addr:127.0.0.1  Bcast:127.255.255.255 Mask:255.0.0.0           UP BROADCAST LOOPBACK RUNNING  MTU:3584  Metric:1           RX packets:18 errors:0 dropped:0 overruns:0 frame:0           TX packets:18 errors:0 dropped:0 overruns:0 carrier:0 coll:0

eth0      Link encap:Ethernet  HWaddr 00:E0:98:01:1C:87           inet addr:130.85.100.254  Bcast:130.85.100.255  Mask:255.255.255.0           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:14 errors:0 dropped:0 overruns:0 frame:0           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 coll:0           Interrupt:5 Base address:0x300

Page 9: Jump to first page Setup Ethernet & PPP client on Laptop computer Presented by: Xuewu Cai Jianfang Wang

Jump to first page

Configure PPP client

Choose chat as dialup tools Write a piece of chat script as

following:

' ' ATZ OK ATDTtelno CONNECT ' ' username < user account... passwd <user password... PPP 1

Save it as script.dialup

Run pppd, choosing options likepppd connect "chat -f script.dialup" /dev/cua1 115200 -detach modem noipdefault defaultroute

Page 10: Jump to first page Setup Ethernet & PPP client on Laptop computer Presented by: Xuewu Cai Jianfang Wang

Jump to first page

Cont’d (PPP client)

Set proper route for PPP using route command.

What to disconnect PPP connection? Use command like:

kill `cat /var/run/ppp0.pid /dev/console

Page 11: Jump to first page Setup Ethernet & PPP client on Laptop computer Presented by: Xuewu Cai Jianfang Wang

Jump to first page

Ifconfig output lo Link encap:Local Loopback

inet addr:127.0.0.1 Bcast:127.255.255.255 Mask:255.0.0.0 UP BROADCAST LOOPBACK RUNNING MTU:3584 Metric:1 RX packets:18 errors:0 dropped:0 overruns:0 frame:0 TX packets:18 errors:0 dropped:0 overruns:0 carrier:0 coll:0

eth0 Link encap:Ethernet HWaddr 00:E0:98:01:1C:87 inet addr:130.85.100.254 Bcast:130.85.100.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 coll:0 Interrupt:5 Base address:0x300

ppp0 Link encap:Point-to-Point Protocol inet addr:130.85.97.34 P-t-P:130.85.2.203 Mask:255.255.255.0 UP POINTOPOINT RUNNING MTU:1500 Metric:1 RX packets:24 errors:0 dropped:0 overruns:0 frame:0 TX packets:7 errors:0 dropped:0 overruns:0 carrier:0 coll:0