Quantcast
Channel: openSUSE Forums
Viewing all articles
Browse latest Browse all 40713

Configuring ethernet and wifi connexion using ifup on same notepad

$
0
0
Hello.

I use a broadband adsl modem/router which give ethernet and wifi connexion and dhcp server function.
For the understanding, I will name it BBOX
The network ip address is set to 192.168.2.0
The BBOX ip address is set to 192.168.2.200
The BBOX dhcp server network addresses are from 192.168.2.10 to 192.168.2.50

I use a second router with no wifi capability.
For the understanding, I will name it NETGEAR_ROUTER
The input IP address given by BBOX dhcp server is from 192.168.2.10 to 192.168.2.50
This give me a second network whose address is set to 192.168.130.0
The NETGEAR_ROUTER ip address is set to 192.168.130.230
The NETGEAR_ROUTER dhcp server network addresses are from 192.168.130.50 to 192.168.130.150
Using mac address, my local opensuse server get a fixed address 192.168.130.100, my 2 printers get also fixed address 192.168.130.103 and 192.168.130.105, my TV get adress 192.168.130.105.
As soon as any notepad is connected, NETGEAR_ROUTER dhcp server give them an ip address.

Every things work perfectly with ethernet connexions.

Now I have enabled wifi on notepads.
I have configured the wifi connexion with yast (using ifup is set)
have set managed mode, ESSID, WPA-PSK, passphrase, encryption key
They connect automatically to BBOX and get an ip address within 192.168.2.10 to 192.168.2.50 by the BBOX dhcp server.

When I disconnect the wired connexion, I could not go to internet.
pinging one of google.com adress give Destination Host Unreachable
Code:

linux:~ # ping 173.194.40.100
PING 173.194.40.100 (173.194.40.100) 56(84) bytes of data.
From 192.168.130.90 icmp_seq=1 Destination Host Unreachable
From 192.168.130.90 icmp_seq=2 Destination Host Unreachable
From 192.168.130.90 icmp_seq=3 Destination Host Unreachable
From 192.168.130.90 icmp_seq=4 Destination Host Unreachable
^C
--- 173.194.40.100 ping statistics ---
6 packets transmitted, 0 received, +4 errors, 100% packet loss, time 5001ms
pipe 3

Code:

linux:~ # ifconfig
enp8s0    Link encap:Ethernet  HWaddr 00:1B:24:56:F1:36 
          inet addr:192.168.130.90  Bcast:192.168.130.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:18755 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16839 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:15289639 (14.5 Mb)  TX bytes:3349099 (3.1 Mb)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:9331 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9331 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:966507 (943.8 Kb)  TX bytes:966507 (943.8 Kb)

wlp2s0    Link encap:Ethernet  HWaddr 00:1B:77:4C:7E:A9 
          inet addr:192.168.2.38  Bcast:192.168.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3255 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2333 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:317570 (310.1 Kb)  TX bytes:199525 (194.8 Kb)

Code:

linux:~ # cat /etc/resolv.conf
### /etc/resolv.conf file autogenerated by netconfig!
#
# Before you change this file manually, consider to define the
# static DNS configuration using the following variables in the
# /etc/sysconfig/network/config file:
#    NETCONFIG_DNS_STATIC_SEARCHLIST
#    NETCONFIG_DNS_STATIC_SERVERS
#    NETCONFIG_DNS_FORWARDER
# or disable DNS configuration updates via netconfig by setting:
#    NETCONFIG_DNS_POLICY=''
#
# See also the netconfig(8) manual page and other documentation.
#
# Note: Manual change of this file disables netconfig too, but
# may get lost when this file contains comments or empty lines
# only, the netconfig settings are same with settings in this
# file and in case of a "netconfig update -f" call.
#
### Please remove (at least) this line when you modify the file!
search lan
nameserver 192.168.2.200

Code:

linux:~ # route -n
Kernel IP routing table
Destination    Gateway          Genmask        Flags Metric Ref    Use Iface
0.0.0.0        192.168.130.230  0.0.0.0          UG    0      0        0 enp8s0
127.0.0.0      0.0.0.0            255.0.0.0        U    0      0        0 lo
192.168.2.0    0.0.0.0            255.255.255.0  U    0      0        0 wlp2s0
192.168.130.0  0.0.0.0          255.255.255.0  U    0      0        0 enp8s0

Code:

linux:~ # nslookup google.com
Server:        192.168.2.200
Address:        192.168.2.200#53

Non-authoritative answer:
Name:  google.com
Address: 173.194.40.100
Name:  google.com
Address: 173.194.40.110
Name:  google.com
Address: 173.194.40.102
Name:  google.com
Address: 173.194.40.105
Name:  google.com
Address: 173.194.40.96
Name:  google.com
Address: 173.194.40.104
Name:  google.com
Address: 173.194.40.101
Name:  google.com
Address: 173.194.40.98
Name:  google.com
Address: 173.194.40.99
Name:  google.com
Address: 173.194.40.103
Name:  google.com
Address: 173.194.40.97

Using NetworkManager it is working.
But I want to do the same using ifup method.


Any help is welcome

Viewing all articles
Browse latest Browse all 40713

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>