Question of dual network card answering access

Kernels & Hardware, configuring network, installing services

Question of dual network card answering access

Postby baodl » 2020-01-25 06:23

The server is debian9 with two network cards

The NIC A is set to 192.168.0.1/255.255.252.0, the client IP is set to 192.168.0.10/255.255.252.0, and the client access 0.1 is normal.

Network card B has an IP address of 192.168.0.100/255.255.255.0, and is connected to another switch, which is on its own network.

The problem now is that all the server's 192.168.0.X accesses go to network card B, and network card A does not respond to 0.X access, whether it is 0.X / 24 or 0.X / 22

View server routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 NIC B
192.168.0.0 0.0.0.0 255.255.252.0 U 0 0 0 NIC A

-------------------------------------------------- ----------------------------------
How do I set up 0.X / 22 to go to network card A (192.168.0.1/255.255.252.0)
Then 0.X / 24 goes to network card B (192.168.0.1/255.255.255.0)?


And currently, debian does not enable packet forwarding.
net.ipv4.ip_forward = 0
baodl
 
Posts: 1
Joined: 2020-01-25 04:53

Re: Question of dual network card answering access

Postby CwF » 2020-01-25 13:03

maybe for B, 192.168.1.1.
CwF
 
Posts: 568
Joined: 2018-06-20 15:16

Re: Question of dual network card answering access

Postby p.H » 2020-01-27 09:13

baodl wrote:Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 NIC B
192.168.0.0 0.0.0.0 255.255.252.0 U 0 0 0 NIC A

You realize that these network ranges overlap each other, don't you ? It cannot work. You must configure non overlapping ranges.
p.H
 
Posts: 1260
Joined: 2017-09-17 07:12


Return to System configuration

Who is online

Users browsing this forum: No registered users and 11 guests

fashionable