Unable to get IP address from DHCP on remote end.

Quan Zhou qzhou at live.de
Fri Mar 27 07:54:34 CET 2015


Hi all,

I followed the guide "simple-bridging-with-dhcp", which has two parts:
http://www.tinc-vpn.org/examples/simple-bridging-with-dhcp-server-side/
http://www.tinc-vpn.org/examples/simple-bridging-with-dhcp-client-side/

I have altered two things to fit my needs, 1) DHCP server(host:pek1) is on client side ethernet, so I have bridged eth0 and tun1 together; 2) Network/Server/Client Names.

The problem I have is, tinc connect can be established, but the tun1 on tinc server(host:nrj1) didn’t get IP address. Could be anything I missed in my configurations?

Regards,

Quan Zhou

+------------------------+
|pub [expires 2015-09-05]|
|44D2 0307 1643 E80F 2E31|
|F081 FAFA 6643 7F9F D46F|
+------------------------+
|qzhou at live.de           |
|https://keybase.io/qzhou|
+------------------------+

Exhibit 1(server confs, nrj1):
-----------------------------------------------------------------------
root at nrj1: ~# ifconfig tun1
tun1      Link encap:Ethernet  HWaddr 8e:10:69:58:48:29
          inet6 addr: fe80::8c10:69ff:fe58:4829/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:219 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:24796 (24.2 KiB)  TX bytes:1476 (1.4 KiB)

root at nrj1:~# cat /etc/tinc/aldburg/tinc.conf
Device = /dev/net/tun
Interface = tun1
Mode = switch
Name = nrj1

root at nrj1:~# cat /etc/tinc/aldburg/hosts/nrj1
Compression = 9
PMTU = 1492
PMTUDiscovery = yes
Port = 656
-----BEGIN RSA PUBLIC KEY-----
-----END RSA PUBLIC KEY-----
-----------------------------------------------------------------------


Exhibit 2(Client, pek1):
-----------------------------------------------------------------------
root at oldmill:~# ifconfig tun1
tun1      Link encap:Ethernet  HWaddr 0a:51:d0:34:c1:b8
          inet6 addr: fe80::851:d0ff:fe34:c1b8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7 errors:0 dropped:0 overruns:0 frame:0
          TX packets:310 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:738 (738.0 B)  TX bytes:35399 (34.5 KiB)

root at oldmill:~# ifconfig br0
br0       Link encap:Ethernet  HWaddr 00:0c:29:6e:29:0d
          inet addr:192.168.88.252  Bcast:192.168.88.255  Mask:255.255.255.0
          inet6 addr: [stripped] Scope:Global
          inet6 addr: fe80::20c:29ff:fe6e:290d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7570 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4777 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:545249 (532.4 KiB)  TX bytes:728832 (711.7 KiB)

root at oldmill:~# cat /etc/tinc/aldburg/tinc.conf
ConnectTo = nrj1
AddressFamily = ipv4
Device = /dev/net/tun
Interface = tun1
Mode = switch
Name = pek1

root at oldmill:~# cat /etc/tinc/aldburg/hosts/nrj1
Address = [domain name/ip address stripped] 656
-----BEGIN RSA PUBLIC KEY-----
-----END RSA PUBLIC KEY——

root at oldmill:~# cat /etc/tinc/aldburg/hosts/nrj1-up
#!/bin/sh
ifup $INTERFACE & # Quan Zhou: why \& ?

root at oldmill:~# cat /etc/tinc/aldburg/hosts/nrj1-down
#!/bin/sh
ifdown $INTERFACE

root at oldmill:~# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
auto eth0
iface eth0 inet dhcp
# This is an autoconfigured IPv6 interface
iface eth0 inet6 auto

# The bridge for tinc
auto br0
iface br0 inet dhcp
	bridge_ports tun1 eth0
	bridge_maxwait 1
	bridge_fd 2.5
	post-up /bin/echo 1 > /proc/sys/net/ipv4/conf/br0/proxy_arp


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://www.tinc-vpn.org/pipermail/tinc/attachments/20150327/ef93595c/attachment.sig>


More information about the tinc mailing list