ifname comes as br-lan. Router can be accessed via LAN IP only if ifname is eth0
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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?
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
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.