LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-07-2019, 09:06 PM   #1
arangking
LQ Newbie
 
Registered: Jul 2019
Posts: 3

Rep: Reputation: 0
ifname comes as br-lan. Router can be accessed via LAN IP only if ifname is eth0


ifname comes as br-lan. Router can be accessed via LAN IP only if ifname is eth0

In /etc/config/network, if I manually edit ifname as eth0 then I could access my router via LAN IP.

In case if I edit, WAN IP (or) LAN IP from static <-> DHCP or edit static IP then
the configuration for LAN gets changed in /etc/config/network.
ifname changed from eth0 to br-lan

Router should be accessed via LAN IP, even if ifname is br-lan.

If any one has an idea then please let me know.
 
Old 07-08-2019, 02:51 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Can you share
- the Linux distro
- the exact content of /etc/config/network in both cases (connectivity to router, and no connectivity to router)
- the output of the ip address and ip route commands in both cases
- how do you try to access the router

Is there anything else you do apart from changing the name of an interface in a file? I.e. are you running any command that updates the network configuration or you just edit the file?
 
Old 07-09-2019, 07:20 AM   #3
arangking
LQ Newbie
 
Registered: Jul 2019
Posts: 3

Original Poster
Rep: Reputation: 0
here are answer for your questions

Linux distro is Linux LEDE 4.4.92 #0 SMP Tue Oct 17 17:46:20 2017 armv7l GNU/Linux

network Configuration is same before & after bridging. Please see below /etc/config/network

config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
option up '1'
option device 'lo'

config globals 'globals'
option ula_prefix 'fd02:b211:7b47::/48'

config interface 'lan'
option type 'bridge'
option proto 'static'
option netmask '255.255.255.0'
option ip6assign '60'
option up '1'
option device 'br-lan'
option ipaddr '192.168.1.1'
option ifname 'br-lan'

config interface 'wan'
option ifname 'eth2'
option up '1'
option device 'eth2'
option proto 'static'
option netmask '255.255.255.0'
option ipaddr '192.168.0.99'

config interface 'wan6'
option ifname 'eth2'
option up '1'
option device 'eth2'
option netmask '255.255.255.0'
option proto 'static'
option ipaddr '192.168.0.100'

root@LEDE:/# ip addr[/COLOR]
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 532
link/ether 2e:d7:af:12:e1:96 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 532
link/ether 92:67:67:88:6d:13 brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 532
link/ether c2:d8:c5:2d:92:0e brd ff:ff:ff:ff:ff:ff
inet 192.168.0.99/24 brd 192.168.0.255 scope global eth2
valid_lft forever preferred_lft forever
inet 192.168.0.100/24 brd 192.168.0.255 scope global secondary eth2
valid_lft forever preferred_lft forever
5: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether f2:e6:72:4c:d1:0e brd ff:ff:ff:ff:ff:ff
7: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether 20:ce:c4:a0:01:37 brd ff:ff:ff:ff:ff:ff
8: ***0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether 02:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
9: ***1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether 12:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
10: ***2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether 22:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
11: ***3: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether 32:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
28: br-lan: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.1/24 brd 192.168.1.255 scope global br-lan
valid_lft forever preferred_lft forever

root@LEDE:/# ip route
192.168.0.0/24 dev eth2 proto kernel scope link src 192.168.0.99
192.168.1.0/24 dev br-lan proto kernel scope link src 192.168.1.1 linkdown

I access router from PC via ethernet cable connected to rourter's ethernet port (eth0)

Each Router has external USB dongle connected to it.


I change /etc/config/network via javascript that calls uci which component of openwrt
 
Old 07-09-2019, 09:28 AM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Sorry, had I known that you run OpenWRT and that the router you mention is the system where the problem occurs, I would not had answered. To help you, I would first have to learn about OpenWRT and its configuration, for which I don’t have time right now.

One thing that strikes me: br-lan is down and has no MAC address. On the other hand, all interfaces are down, so that this might be meaningless.
 
Old 07-13-2019, 06:57 PM   #5
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian 6+, CentOS 5+
Posts: 1,323

Rep: Reputation: 100Reputation: 100
If your br-lan interface is the one with the IP, it needs a MAC address or networking can't work, try assigning one to it you can use option macaddr see https://openwrt.org/docs/guide-user/...sic-networking
 
Old 07-14-2019, 10:41 AM   #6
arangking
LQ Newbie
 
Registered: Jul 2019
Posts: 3

Original Poster
Rep: Reputation: 0
br-lan has mac address. Please see the following.

br-lan Link encap:Ethernet HWaddr 20:CE:C4:A0:01:48
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST 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
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

Even if I change IP address of WAN or WAN6, the ifname for LAN also gets changed from eth0 to br-lan.
Front end code doesn't send ifname for LAN as br-lan. But it gets replaced.

Scripts wouldn't have changed it. To test this, I manually edited IP of WAN in /etc/config/network.
And restarted network using /etc/init.d/network restart. Finally checked /etc/config/network.
In this case, ifname for LAN doesn't get changed.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting IFNAME marijan Slackware 7 08-29-2013 09:54 AM
ppp-ifname patch ciorny Slackware 2 01-25-2011 02:53 AM
Slackware 13 (64 bit) IFNAME[4]="wlan0:1" KrazyKanuk Slackware 3 02-02-2010 06:34 AM
XP/Fedora8 File Sharing - can only be accessed via IP Gio Linux - Networking 1 01-10-2008 01:16 AM
Wireless network on eth1 diabled Ethernet eth0 and eth0 never comes back tadatoshi Linux - Wireless Networking 4 09-23-2004 05:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration