LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-14-2019, 07:35 AM   #1
buchmann
LQ Newbie
 
Registered: Jun 2019
Posts: 2

Rep: Reputation: Disabled
Why my LXC container cannot ping/ssh/netcat remote of 169.254.X.X subnet ?


Hi,

This is a quick overview of the setup:
- 1 PC (host + LXC container)
- 1 "remote" device (RJ45 wire to PC) using avahi: 169.254.7.236

I would like to do:
remote_device$ ping 169.254.2.123 # failed to ping container IP from remote device
container$ ping 169.254.7.236 # failed to ping remote device from container

The following works:
host$ ping 169.254.7.236 # ping remote device from host OK
remote_device$ ping 169.254.5.206 # ping host from remote device OK
remote_device$ ping linuxquestions.org #*ping the best server ever OK

I guess the problem could be resolved by adding rules in iptables. So I tried unsuccesfully. Yes. I do not understand what I am doing. So, I provide the original state before my tests:
Quote:
$ sudo iptables -L -v
Chain INPUT (policy ACCEPT 2 packets, 134 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT udp -- virbr0 any anywhere anywhere udp dpt:domain
0 0 ACCEPT tcp -- virbr0 any anywhere anywhere tcp dpt:domain
0 0 ACCEPT udp -- virbr0 any anywhere anywhere udp dpt:bootps
0 0 ACCEPT tcp -- virbr0 any anywhere anywhere tcp dpt:bootps
0 0 ACCEPT tcp -- lxcbr0 any anywhere anywhere tcp dpt:domain
0 0 ACCEPT udp -- lxcbr0 any anywhere anywhere udp dpt:domain
0 0 ACCEPT tcp -- lxcbr0 any anywhere anywhere tcp dpt:bootps
0 0 ACCEPT udp -- lxcbr0 any anywhere anywhere udp dpt:bootps

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- any virbr0 anywhere 192.168.122.0/24 ctstate RELATED,ESTABLISHED
0 0 ACCEPT all -- virbr0 any 192.168.122.0/24 anywhere
0 0 ACCEPT all -- virbr0 virbr0 anywhere anywhere
0 0 REJECT all -- any virbr0 anywhere anywhere reject-with icmp-port-unreachable
0 0 REJECT all -- virbr0 any anywhere anywhere reject-with icmp-port-unreachable
0 0 ACCEPT all -- any lxcbr0 anywhere anywhere
0 0 ACCEPT all -- lxcbr0 any anywhere anywhere

Chain OUTPUT (policy ACCEPT 2 packets, 134 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT udp -- any virbr0 anywhere anywhere udp dpt:bootpc
Anyone have solutions or hints ?

Best regards
 
Old Yesterday, 12:35 PM   #2
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,260

Rep: Reputation: 2200Reputation: 2200Reputation: 2200Reputation: 2200Reputation: 2200Reputation: 2200Reputation: 2200Reputation: 2200Reputation: 2200Reputation: 2200Reputation: 2200
Why are you using autoip? I haven't read the specifications but I don't think it's designed for the things you are trying to do.
 
Old Yesterday, 02:06 PM   #3
buchmann
LQ Newbie
 
Registered: Jun 2019
Posts: 2

Original Poster
Rep: Reputation: Disabled
Hi 273

Thank you for the reply.

Autoipd just provide me a way to get an IP without collision. I am trying to simulate an embedded software using an LXC. The embedded device use autoipd.

I guess it does not matter. I guess I just need a way to route packets from/to an LXC in subnet 169.254.x.x.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Automatically my static ip changes to 169.254.169.254 Arunkumar Goge Linux - Networking 2 04-01-2013 05:19 PM
Removing DHCP (169.254.0.0) From static routes Alistair Linux - Networking 2 09-02-2011 09:49 AM
Destination 169.254.0.0 ESOOJAY Linux - Networking 1 05-13-2007 05:23 PM
Odd IP address 169.254.187.86 in ifconfig (Etch) farpoint Debian 8 12-11-2006 11:10 AM
169.254.0.0 in Kernal IP routing table aikempshall Linux - Networking 13 03-10-2004 11:30 PM

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

All times are GMT -5. The time now is 11:55 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration