Routers already (by default) route traffic for their directly-connected networks, and these routes are automatically populated in the routing tables simply by assigning an IP address on a router (or Layer-3 switch) interface and bringing the interface "UP" (i.e. you may need to issue a "no shutdown" type of command depending upon the router).
In your example, if you took a plain Cisco router (or layer-3 switch) with a couple of simple Ethernet ports, assigned them IP addresses (as described), and brought them up, the routing table would simply look like this:
Router#sh ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
Gateway of last resort is not set
C 192.168.6.0/24 is directly connected, FastEthernet0/1
C 192.168.1.0/24 is directly connected, FastEthernet0/0
Router#
Note: On a Layer-3 switch, you probably need to issue a "no switchport" command on the Interfaces you are going to tag with Layer-3 addresses.
***************
What PhaZed seems to be talking about is sharing routes between routers in which case, you would ultimately tell a router that in order to access a specific network subnet (that it doesn't have already directly-connected) that it needs to route that out a specific interface (toward another router) or that it needs to route that traffic to another IP, that is the interface on another router, which is directly connected to this one.
For example, if you had two (2) routers and one hosted the 192.168.1/24 network and the other hosted the 192.168.6/24 network, they would NOT know what network is on the other router unless someone configured a route either statically or via a dynamic routing protocol. That said, both routers would have to be connected together via two interfaces on the same subnet.
Here is what I am saying:
Let's say two routers are both connected via their FastEthernet0/1 interfaces. That is FastEthernet0/1 is connected to FastEthernet0/1.... both of these two interfaces MUST be on the same subnet. That said, they can be totally different than the destination network. I am going to use a 10.0.0.0/8 network, which will dramatically show the difference.
Router1#sh ip int br
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.1.1 YES manual up up
FastEthernet0/1 10.0.0.1 YES manual up up
Vlan1 unassigned YES unset administratively down down
Router1#
Router2#sh ip int br
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.6.1 YES manual up up
FastEthernet0/1 10.0.0.2 YES manual up up
Vlan1 unassigned YES unset administratively down down
Router2#
As long as from Router 1 (the router with the 192.168.1.x network) you have a route that says you can get to the 192.168.6.x network via 10.0.0.2 (On Router 2), Router 1 will find it because it has an interface (10.0.0.1) that can communicate with that router.
Here are the tables:
Router1#sh ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
Gateway of last resort is not set
C 10.0.0.0/8 is directly connected, FastEthernet0/1
C 192.168.1.0/24 is directly connected, FastEthernet0/0
S 192.168.6.0/24 [1/0] via 10.0.0.2
Router1#
Router2#sh ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
Gateway of last resort is not set
C 10.0.0.0/8 is directly connected, FastEthernet0/1
S 192.168.1.0/24 [1/0] via 10.0.0.1
C 192.168.6.0/24 is directly connected, FastEthernet0/0
Router2#
***************************
Another option other than routing to a specific IP is to route out an Interface. It will show as directly connected via a static route the "S" because it is not really directly connected... only it works the same because the other router will answer.
The tables would then look like this:
Router1#sh ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
Gateway of last resort is not set
C 10.0.0.0/8 is directly connected, FastEthernet0/1
C 192.168.1.0/24 is directly connected, FastEthernet0/0
S 192.168.6.0/24 is directly connected, FastEthernet0/1
Router1#
Router#sh ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
Gateway of last resort is not set
C 10.0.0.0/8 is directly connected, FastEthernet0/1
S 192.168.1.0/24 is directly connected, FastEthernet0/1
C 192.168.6.0/24 is directly connected, FastEthernet0/0
Router2#