JattMannu / react-blog-github

🔥 React + Github Issues 👉 Your Personal Blog
https://saadpasta.github.io/react-blog-github/#/
MIT License
0 stars 0 forks source link

TODO #5

Open JattMannu opened 3 years ago

JattMannu commented 3 years ago

Go to machine A

ip link

Output :

    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: **enp3s0**: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel **state UP mode** DEFAULT group default qlen 1000
    link/ether b4:a9:fc:7a:74:29 brd ff:ff:ff:ff:ff:ff

Ensure the mode is UP

You would need to update the below command to use different dev enp3s0 etc. On computer A

sudo ip ad add 10.0.0.10/24 dev eth0

On computer B

sudo ip ad add 10.0.0.20/24 dev eth0

To test from A to B

ping 10.0.0.20

To test from B to A

ping 10.0.0.10

Provided that a cable is connecting the two computers and the network interface on both of them is enabled and called eth0 this should work. The rest of this post is to help troubleshoot if there are problems.

10.0.0.xx is the IP address of the computers. /24 tells the computers that the last 8 bits of the 32-bit IP address can change. It is similar to saying netmask 255.255.255.0. This setup the routes that the computer/network has available to it.

you should see something similar to this using

ip r

Output for computer A

10.0.0.0/24 dev **enp3s0** proto kernel scope link src 10.0.0.10 

If you don't see something like above in the route table but see something like this when you use IP ad. You need to add the address again using /24 subnet syntax.

ip ad
inet 172.16.1.40/32 scope global eth0