0

I have a Linux machine with two network interfaces, and I'd like to get the IP address of the PPP interface w1g1 but it doesn't show up in ifconfig. There is a public IP on the PPP interface, but there is no internet connection, I'm trying to troubleshoot but I need to get the IP address of the interface and I can't.

ifconfig :

eth0      Link encap:Ethernet  HWaddr 00:30:48:8D:F0:2C
          inet addr:192.168.2.254  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::230:48ff:fe8d:f02c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9970 errors:0 dropped:567 overruns:0 frame:0
          TX packets:4338 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:1441024 (1.3 MiB)  TX bytes:915814 (894.3 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:675 errors:0 dropped:0 overruns:0 frame:0
          TX packets:675 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:50659 (49.4 KiB)  TX bytes:50659 (49.4 KiB)

w1g1      Link encap:Point-to-Point Protocol
          UP POINTOPOINT RUNNING NOARP  MTU:240  Metric:1
          RX packets:748994 errors:0 dropped:0 overruns:0 frame:0
          TX packets:748992 errors:0 dropped:0 overruns:0 carrier:3
          collisions:0 txqueuelen:100
          RX bytes:179758560 (171.4 MiB)  TX bytes:179758080 (171.4 MiB)
          Interrupt:177 Memory:f881c400-f881e3ff

w1g1 is connected to a modem by an RJ45<->Serial cable and the modem is connected to the phone line. The modem is a NOKIA DNT2Mi you can see it here

Routing table :

192.168.2.0/24 dev eth0  proto kernel  scope link  src 192.168.2.254
169.254.0.0/16 dev eth0  scope link
default via 192.168.2.180 dev eth0
17
  • 2
    There is no IP on that interface, and that's most likely why you don't have an internet connection.
    – user186340
    Aug 21, 2014 at 14:27
  • 3
    Sidenote: ifconfig is deprecated in Linux now. You should be using ip.
    – Chris S
    Aug 21, 2014 at 14:30
  • @AndréDaniel But when i ping the Ip address supposed to be on that interface it answers,how can you explain that ? (I do the ping from the same computer, it't not working elsewhere )
    – Xsmael
    Aug 21, 2014 at 14:40
  • 1
    Do you have ping through-t : ping -I w1g1 8.8.8.8 ? Aug 21, 2014 at 14:41
  • @Xsmael are you sure your ping isn't going through eth0 instead ? Can you edit your question and add the current routing table, accessible with route or ip route show (if I remember right) ?
    – user186340
    Aug 21, 2014 at 14:44

2 Answers 2

1

You didn't say what distribution you are using, but it looks like your w1g1 interface does not even have an IP address.

My suggestion is to bring pppd down and restart it.

On most distributions, the easy way is to use these commands:

ifdown w1g1
ifup w1g1

If that doesn't work and you are not trying this remotely, you might want to stop all networking and restart it:

service network stop
service network start
3
  • ok, Tried to restart the network interface w1g1, with ifdown w1g1 and ifup w1g1' but surprisingly it doesn't work, it answers usage: ifdown <device name>` it's like it doesn't recognize w1g1 even though that name appears when i run ifconfig.
    – Xsmael
    Aug 22, 2014 at 14:15
  • whent restart the network service, all the interfaces are restarted except w1g1. do you know what's happening ?
    – Xsmael
    Aug 22, 2014 at 15:42
  • The ifup/ifdown/service network start/stop commands all depend on configuration files in /etc/sysconfig/network-scripts called ifcfg-XXX (where XXX is the device name). The linux kernel itself does not depend on those files, so other programs/scripts/commands can be used to create interfaces as well, but I can't help without more information about what command was used to create w1g1. Sep 1, 2014 at 15:47
0

My answer was deleted, I cannot comment, so here I try again:

Run:

ip addr show

or

ifconfig -a

Maybe you are just looking at the wrong interface? Look for the interface with the IP that you can ping.

A google search for "w1g1" resulted in stuff like:

your PPP interface will come up as w*g1ppp. (for example w1g1ppp)

1
  • There are two interfaces: one for LAN(private IP) and the other for WAN(public IP), I can ping both IP addresses with no problem, but when I run ifconfig the ip address of w1g1 doesn't appear as you can see on my post but when I ping his ip address it answers!
    – Xsmael
    Aug 22, 2014 at 15:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .