Eth0.1 ip address is available but not able to login

Ip address has been assigned but not able to login for eth0.1

root@ROOter:/# ifconfig 
eth0      Link encap:Ethernet  HWaddr 9C:65:F9:1B:F3:94  
          inet addr:192.168.5.1  Bcast:192.168.5.255  Mask:255.255.255.0
          inet6 addr: fe80::9e65:f9ff:fe1b:f394/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:214 errors:0 dropped:0 overruns:0 frame:0
          TX packets:459 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:34923 (34.1 KiB)  TX bytes:67998 (66.4 KiB)
          Interrupt:5 

eth0.1    Link encap:Ethernet  HWaddr 9C:65:F9:1B:F3:94  
          inet addr:192.168.3.1  Bcast:192.168.3.255  Mask:255.255.255.0
          inet6 addr: fe80::9e65:f9ff:fe1b:f394/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:29 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:4547 (4.4 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:65536  Metric:1
          RX packets:1559 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1559 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:107452 (104.9 KiB)  TX bytes:107452 (104.9 KiB)

root@ROOter:/# cat /etc/config/network 

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

config interface 'lan_eth0'
        option ifname 'eth0'
        option proto 'static'
        option ipaddr '192.168.5.1'
        option netmask '255.255.255.0'

config interface 'lan'
        option ifname 'eth0.1'
        option proto 'static'
        option ipaddr '192.168.3.1'
        option netmask '255.255.255.0'
type or paste code here
eth0.1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0

https://openwrt.org/docs/guide-user/network/vlan/switch
https://www.ct-networks.io/community/tutorials/openwrt-configuring-vlans.html

How to configure this eth0.1 interface.I have two ethernet ports in my board .I need to assign different IP address for two ethernet ports.The IP address assigned should be static

i'm not sidekick :see_no_evil:

This way you are using vlan tagging and my feeling is that the other side it now aware of them. Use the second ethernet interface, or get yourself a smart switch that will connect the trunk port of openwrt with access ports.

  • Then wouldn't they be eth0 and eth1?
  • What board?
1 Like

only eth0 is avilable .I am using openert 18.06 version in my router

sorry,it is openwrt 18.06

uci show network
ubus call system board
ip a; ip r
root@ROOter:/# ubus call system board
{
        "kernel": "4.14.89",
        "hostname": "ROOter",
        "system": "MediaTek MT7688 ver:1 eco:2",
        "model": "MediaTek LinkIt Smart 7688",
        "board_name": "linkits7688",
        "release": {
                "distribution": "OpenWrt",
                "version": "18.06-SNAPSHOT",
                "revision": "unknown",
                "codename": "",
                "target": "ramips\/mt76x8",
                "description": "GoldenOrb-Version-1 ( OpenWrt 18.06-SNAPSHOT unknown )"
        }
}


root@ROOter:/# ip a; ip r
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    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
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000
    link/ether 9c:65:f9:1b:f3:94 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::9e65:f9ff:fe1b:f394/64 scope link 
       valid_lft forever preferred_lft forever
3: ifb0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 32
    link/ether 4e:89:b4:71:fd:e9 brd ff:ff:ff:ff:ff:ff
4: ifb1: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 32
    link/ether be:e5:a7:e7:5d:14 brd ff:ff:ff:ff:ff:ff
23: eth0.1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 9c:65:f9:1b:f3:94 brd ff:ff:ff:ff:ff:ff
    inet 192.168.3.1/24 brd 192.168.3.255 scope global eth0.1
       valid_lft forever preferred_lft forever
    inet6 fe80::9e65:f9ff:fe1b:f394/64 scope link 
       valid_lft forever preferred_lft forever
24: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 9c:00:02:92:92:6e brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.55/24 brd 192.168.1.255 scope global wlan0
       valid_lft forever preferred_lft forever
    inet6 fe80::9e00:2ff:fe92:926e/64 scope link 
       valid_lft forever preferred_lft forever
default via 192.168.1.1 dev wlan0 proto static src 192.168.1.55 
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.55 
192.168.3.0/24 dev eth0.1 proto kernel scope link src 192.168.3.1 


root@ROOter:/# uci show network
network.loopback=interface
network.loopback.ifname='lo'
network.loopback.proto='static'
network.loopback.ipaddr='127.0.0.1'
network.loopback.netmask='255.0.0.0'
network.lan_eth0=interface
network.lan_eth0.ifname='eth0'
network.lan_eth0.proto='static'
network.lan_eth0.ipaddr='192.168.5.1'
network.lan_eth0.netmask='255.255.255.0'
network.lan_eth1=interface
network.lan_eth1.ifname='eth0.1'
network.lan_eth1.proto='static'
network.lan_eth1.ipaddr='192.168.3.1'
network.lan_eth1.netmask='255.255.255.0'
network.wifi=interface
network.wifi.proto='dhcp'

As I said ...

How do you separate the frames of different vlans?

swconfig list; swconfig dev switch0 show
1 Like

As I asked:

Can you explain what network cards are installed, please?

@Anusha I think you are trying to use Vlans and at the same time trying to use the physical port itself. AFAIK it wont work. You will need to assign two vlans if you want two different networks.

1 Like