Re: local network

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



OK,

Now it is working with 
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 enp0s20f0u11
0.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 bridge0
10.40.0.0       0.0.0.0         255.255.255.0   U         0 0          0 bridge0
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 enp0s20f0u11
192.168.1.1     0.0.0.0         255.255.255.255 UH        0 0          0 bridge0
192.168.122.0   0.0.0.0         255.255.255.0   U         0 0          0 virbr0

Question
I have enp1s0 ipv4 manually set as
10.40.1.0/24   without GW, neither DNS
enp2s0 ivpv4 also manually set as
10.40.2.0/24    without GW, neither DNS

and 
enp1s0 port 1 and enp2s0 port 2 set automatic DHCP
Should I keep it like that?
Will be the IP addresses always conserved?



> On 6/16/25 12:25 PM, Patrick Dupre via users wrote:
> > 
> >>
> >> On 6/14/25 11:28 AM, Patrick Dupre via users wrote:
> >>> Hello,
> >>>
> >>> I tried to fix a small issue that I have.
> >>> PC A is connected to internet through a USB port.
> >>> This PC A has 2 RJ45 cards, connected to 2 PC: B and C.
> >>> Both interface are in shared to other computers
> 
> >> I do not know if this will help you or not, but
> >> to get ports to forward, I run this inside my
> >> iptables firewall:
> >>
> >> # Check and force Masquerading
> >> MasqStatus=`cat /proc/sys/net/ipv4/ip_forward`
> >> if [ "$MasqStatus" = "0" ]; then
> >>      echo 1 > /proc/sys/net/ipv4/ip_forward
> >>      logger -p user.notice -t firewall "Warning: IP FORWARDing forced."
> >> fi
> > On PC A
> > cat /proc/sys/net/ipv4/ip_forward
> > 1
> > 
> > On PC B and PC , it is 0
> 
> That's correct.  You should not have to touch any of that yourself. 
> Network manager will handle it all if the interfaces are configured 
> correctly.
> 
> >> Just try the (as root)
> >>       # echo 1 > /proc/sys/net/ipv4/ip_forward
> >> by itself
> >>
> >> Also, would you open a terminal and post the following
> >> for both working and not working?
> >>
> >>       netstat -rn
> >>
> >> It will show who is up and who is down, plus who is
> >> acting as a gateway.  It will let us all know
> >> what exactly is going on.
> > # netstat -rn
> > Kernel IP routing table
> > Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
> > 0.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 bridge0
> > 192.168.1.1     0.0.0.0         255.255.255.255 UH        0 0          0 bridge0
> 
> These shouldn't be there, so there's something wrong with the bridge config.
> 
> > It seems tha because of the bridge enp2s0 does not show up
> > 
> > bridge0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
> >          inet 10.40.0.1  netmask 255.255.255.0  broadcast 10.40.0.255
> >          inet6 fe80::c7db:7630:ffac:a47c  prefixlen 64  scopeid 0x20<link>
> >          ether 88:d7:f6:c5:a3:9d  txqueuelen 1000  (Ethernet)
> >          RX packets 8976  bytes 674062 (658.2 KiB)
> >          RX errors 0  dropped 0  overruns 0  frame 0
> >          TX packets 29742  bytes 1328396 (1.2 MiB)
> >          TX errors 0  dropped 37 overruns 0  carrier 0  collisions 0
> > enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
> >          ether 88:d7:f6:c5:a3:9d  txqueuelen 1000  (Ethernet)
> >          RX packets 9079  bytes 809699 (790.7 KiB)
> >          RX errors 0  dropped 0  overruns 0  frame 0
> >          TX packets 49404  bytes 2353481 (2.2 MiB)
> >          TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
> > enp1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
> >          inet 10.42.0.1  netmask 255.255.255.0  broadcast 10.42.0.255
> >          inet6 fe80::4983:5a2d:430d:2dd9  prefixlen 64  scopeid 0x20<link>
> >          ether 50:91:e3:c9:58:ab  txqueuelen 1000  (Ethernet)
> >          RX packets 29828  bytes 3436837 (3.2 MiB)
> >          RX errors 0  dropped 0  overruns 0  frame 0
> >          TX packets 48392  bytes 45933193 (43.8 MiB)
> >          TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
> 
> enp1s0 should not have an IP address.
> 
> > It also seems that 10.40.0.0 has been created when I configured the bridge between enp1s0 and enp2s0
> > 
> > Right now I have
> > PC B as 10.42.0.82 (configured manually) and it works fine (DNS OK and it can be reached from PB A)
> > and
> > PC C as 10.40.0.204 (configured manually) and it works fine (DNS OK and it can be reached from PB A)
> > 
> > but PC B can reach PC A and verse and versa
> > The bridge is probably not set properly
> 
> You still have enp1s0 configured somewhere.  You need to remove that. 
> PC B should be on 10.40.0.x as well.
> 
> -- 
> _______________________________________________
> users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
> To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
> Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
> Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
> 
-- 
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux