Assigning a /32 to an interface that connects to something else doesn't make any sense. You can assign the /32 to a loopback interface:
interface Loopback0
ip address 192.168.1.1 255.255.255.255
If you want to assign the 192.168.10.1
address to the GigabitEthernet0/0 interface which uses 192.168.10.0/24
:
interface GigabitEthernet0/0
ip address 192.168.10.1 255.255.255.0
This results in the network 192.168.10.0/24
entry in the routing table as a connected route (C
). I suppose it depends on the IOS version, but you can also get a local (not link local which is something else, entirely) route to the specific (/32
) address assigned to an interface in your router. My IOS does this. The version you have doesn't show the L
in the codes, whereas mine does as the first entry:
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override
`
first of all your topology seams to be as following
following your description
pc2 could reach PC1 cause the pc2 GW (which is R2) can reach PC1 (cause it is directly connected to the both network).
so same way let us ask a very importent question . what is the PC1 GW and do PC1 GW know about subnet 192.168.2.X or not ?????????
if PC1 GW is the modem so you must add static route on the modem tell it if you want to reach 192.168.2.X you should go to 192.168.1.2 . otherwise you need to set the GW of PC1 to be 192.168.1.2
Best Answer
When it host is going to send IP traffic, it first checks to see if the destination IP address is on the local subnet. It uses both it's IP address and the subnet mask to make this determination.
If the destination IP is not on the local subnet (your case), the host then checks to see if it has a route to the destination IP in it's routing table. Generally most hosts only have one route, the default route or gateway that is provides somewhere to forward traffic for any other network (barring any more specific route to the destination IP).
In your case, with no configured gateway, the host will determine it doesn't know how to get to the destination IP. This means it has nowhere to send the traffic resulting in the traffic being dropped while generally returning an error like "No Route to Host."