root@OpenWrt:~# ping google.de
^C
root@OpenWrt:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=121 time=37.998 ms
64 bytes from 8.8.8.8: seq=1 ttl=121 time=37.873 ms
^C
--- 8.8.8.8 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 37.873/37.935/37.998 ms
root@OpenWrt:~# 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.globals=globals
network.globals.ula_prefix='fd79:5cfa:0b89::/48'
network.lan=interface
network.lan.ifname='eth1'
network.lan.proto='static'
network.lan.ip6addr='fd01:6665::2e0:99ff:feff:1001/64'
network.lan.netmask='255.255.255.0'
network.lan.ipaddr='10.0.0.1'
network.wan=interface
network.wan.ifname='eth0'
network.wan.proto='dhcp'
root@OpenWrt:~# uci show dhcp
dhcp.@dnsmasq[0]=dnsmasq
dhcp.@dnsmasq[0].domainneeded='1'
dhcp.@dnsmasq[0].boguspriv='1'
dhcp.@dnsmasq[0].filterwin2k='0'
dhcp.@dnsmasq[0].localise_queries='1'
dhcp.@dnsmasq[0].rebind_protection='1'
dhcp.@dnsmasq[0].rebind_localhost='1'
dhcp.@dnsmasq[0].local='/lan/'
dhcp.@dnsmasq[0].domain='lan'
dhcp.@dnsmasq[0].expandhosts='1'
dhcp.@dnsmasq[0].nonegcache='0'
dhcp.@dnsmasq[0].authoritative='1'
dhcp.@dnsmasq[0].readethers='1'
dhcp.@dnsmasq[0].leasefile='/tmp/dhcp.leases'
dhcp.@dnsmasq[0].resolvfile='/tmp/resolv.conf.auto'
dhcp.@dnsmasq[0].nonwildcard='1'
dhcp.@dnsmasq[0].localservice='1'
dhcp.lan=dhcp
dhcp.lan.interface='lan'
dhcp.lan.start='100'
dhcp.lan.limit='150'
dhcp.lan.leasetime='12h'
dhcp.lan.dhcpv6='server'
dhcp.lan.ra='server'
dhcp.wan=dhcp
dhcp.wan.interface='wan'
dhcp.wan.ignore='1'
dhcp.odhcpd=odhcpd
dhcp.odhcpd.maindhcp='0'
dhcp.odhcpd.leasefile='/tmp/hosts/odhcpd'
dhcp.odhcpd.leasetrigger='/usr/sbin/odhcpd-update'
dhcp.odhcpd.loglevel='4'
root@OpenWrt:~# ifstatus wan
{
"up": true,
"pending": false,
"available": true,
"autostart": true,
"dynamic": false,
"uptime": 209,
"l3_device": "eth0",
"proto": "dhcp",
"device": "eth0",
"updated": [
"addresses",
"routes",
"data"
],
"metric": 0,
"dns_metric": 0,
"delegation": true,
"ipv4-address": [
{
"address": "192.168.6.221",
"mask": 24
}
],
"ipv6-address": [
],
"ipv6-prefix": [
],
"ipv6-prefix-assignment": [
],
"route": [
{
"target": "0.0.0.0",
"mask": 0,
"nexthop": "192.168.6.2",
"source": "192.168.6.221\/32"
}
],
"dns-server": [
"192.168.6.2"
],
"dns-search": [
"intern"
],
"inactive": {
"ipv4-address": [
],
"ipv6-address": [
],
"route": [
],
"dns-server": [
],
"dns-search": [
]
},
"data": {
"leasetime": 30000
}
}
root@OpenWrt:~# vi /etc/resolv.conf <-- added "nameserver 8.8.8.8" to install tcpdump
root@OpenWrt:~# ping google.de
PING google.de (216.58.210.3): 56 data bytes
64 bytes from 216.58.210.3: seq=0 ttl=55 time=34.766 ms
^C
--- google.de ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 34.766/34.766/34.766 ms
root@OpenWrt:~# tcpdump -vvvni any udp port 68 &
[1]- Done(1) tcpdump --vvvni any udp port 68
root@OpenWrt:~# tcpdump: listening on any, link-type LINUX_SLL (Linux cooked), capture size 262144 bytes
root@OpenWrt:~# kill -SIGUSR1 $(pidof udhcpc)
root@OpenWrt:~# 09:01:32.282872 IP (tos 0x0, ttl 64, id 418, offset 0, flags [DF], proto UDP (17), length 328)
192.168.6.221.68 > 192.168.6.2.67: [udp sum ok] BOOTP/DHCP, Request from 18:a6:f7:7a:0d:7c, length 300, xid 0xa9174ad, Flags [none] (0x0000)
Client-IP 192.168.6.221
Client-Ethernet-Address 18:a6:f7:7a:0d:7c
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Request
MSZ Option 57, length 2: 576
Parameter-Request Option 55, length 8:
Subnet-Mask, Default-Gateway, Domain-Name-Server, Hostname
Domain-Name, BR, NTP, Classless-Static-Route
Vendor-Class Option 60, length 12: "udhcp 1.29.3"
Hostname Option 12, length 7: "OpenWrt"
END Option 255, length 0
PAD Option 0, length 0, occurs 19
09:01:32.283553 IP (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto UDP (17), length 328)
192.168.6.221.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 18:a6:f7:7a:0d:7c, length 300, xid 0xa9174ad, Flags [none] (0x0000)
Client-IP 192.168.6.221
Client-Ethernet-Address 18:a6:f7:7a:0d:7c
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Request
MSZ Option 57, length 2: 576
Parameter-Request Option 55, length 8:
Subnet-Mask, Default-Gateway, Domain-Name-Server, Hostname
Domain-Name, BR, NTP, Classless-Static-Route
Vendor-Class Option 60, length 12: "udhcp 1.29.3"
Hostname Option 12, length 7: "OpenWrt"
END Option 255, length 0
PAD Option 0, length 0, occurs 19
09:01:32.295570 IP (tos 0x0, ttl 60, id 28554, offset 0, flags [none], proto UDP (17), length 328)
192.168.6.2.67 > 255.255.255.255.68: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0xa9174ad, Flags [none] (0x0000)
Your-IP 192.168.6.221
Client-Ethernet-Address 18:a6:f7:7a:0d:7c
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: ACK
Server-ID Option 54, length 4: 192.168.6.2
Subnet-Mask Option 1, length 4: 255.255.255.0
Default-Gateway Option 3, length 4: 192.168.6.2
Domain-Name-Server Option 6, length 4: 192.168.6.2
Domain-Name Option 15, length 6: "intern"
BR Option 28, length 4: 192.168.6.255
Lease-Time Option 51, length 4: 30000
END Option 255, length 0
PAD Option 0, length 0, occurs 12
09:01:32.312032 IP (tos 0x0, ttl 60, id 28558, offset 0, flags [none], proto UDP (17), length 328)
192.168.6.2.67 > 255.255.255.255.68: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0xa9174ad, Flags [none] (0x0000)
Your-IP 192.168.6.221
Client-Ethernet-Address 18:a6:f7:7a:0d:7c
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: ACK
Server-ID Option 54, length 4: 192.168.6.2
Subnet-Mask Option 1, length 4: 255.255.255.0
Default-Gateway Option 3, length 4: 192.168.6.2
Domain-Name-Server Option 6, length 4: 192.168.6.2
Domain-Name Option 15, length 6: "intern"
BR Option 28, length 4: 192.168.6.255
Lease-Time Option 51, length 4: 30000
END Option 255, length 0
PAD Option 0, length 0, occurs 12